• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

How do i make a Random item Trigger??

Status
Not open for further replies.
Level 3
Joined
Sep 29, 2005
Messages
39
Hi
i need some help ok. i need a trigger for making random items. ok is like this.ok i need a trigger that shows how to make a random item just like the diablo2 horadric cube, but i want is differnt, is when it combines, it has differnt kind of items. okok is liek this i have 2 items i combine them they give me a new 1 item.again i have 2 same kind of items i combine them they give me a differnt new items. thats wat i want jsut the trigger also give me the varibles .
 
its easy all you do in the map editor is click on object propitiers (this little gray box) and somewere it says about having item groups i dont exactly understand variable triggers so i cant realy help there
 
err i mean not clicking on the random items i want it to be clicked as an icon, is not u place the random items on the editor then click on the random item then select wat u want, not that meaning. i want is click on icon then it gives me a random item
 
Well i'll just say that,ok, the reason why,ok, i didnt answer ur original post,ok, is because,ok, it pissed the hell out of me,ok?

Good that u dropped that out of ur future posts, i guess i can help u now :)

First of all u need to do a item type variable. Check the box "array" and put there a number on how many items u want to include in the random items. Name it for example: "randomitem"

After u have done that, set a trigger that goes like this:

Event - Map inizialation
Condition - None
Actions:
-Set variable "randomitem [1]" = "item type of what u want to be in the random item selection"
-Set variable "randomitem [2]" = "item type of what u want to be in the random item selection"
-Set variable "randomitem [3]" = "item type of what u want to be in the random item selection"
-Set variable "randomitem [4]" = "item type of what u want to be in the random item selection"

And so on and so on setting as many items as u want, remember that the limit is on what array number u put for the variable. You can always change it.
Okay, then u make another trigger, u say u want it to give u random item when u click on an icon. Do u mean a skill u use? Or u could buy this from a shop? I shall presume its something u buy from a shop and not a skill u use. Now comes choises, there are more than one way to go from here, i'll tell u one way; make a fake item, base it on a book. Remove all the benifits the book gives, so it will give nothing when used. Then make a trigger like this:

Event - Unit accuires an item
Condition - Item type equal to "fakebookitem"
Actions:
-create "randomitem [random number between 1 to 4]" and give it to "unit manipulating item"

The random number should be between how many arrays u configured in the first trigger. I configured in the example only 4 items, so i put it between 1 and 4. And there u have it, hope this helped.
 
Status
Not open for further replies.
Back
Top