• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] How do i make items appearing anywhere?

Status
Not open for further replies.
Level 6
Joined
Oct 4, 2008
Messages
263
just have an integer variable, set it to a random number, then with if/then/else decide which item is going to be dropped.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
In a trigger, set up your table, means
  • Set items[0] = item1
  • Set items[1] = item2
  • Set items[2] = item3
  • Set items[3] = item4
  • Set items[4] = item5
etc

and for your create item trigger, do
  • Set temppoint = Random point in (Playable Map Area)
  • Item - Create a item[Random integer number between x and y] at temppoint
  • Custom script: call RemoveLocation(udg_temppoint)
whereas x is the lowest number you've set in your table and y being the highest
 
Level 5
Joined
Jul 20, 2008
Messages
59
o_O thanks squiggy

Edit: Sorry but i still need help :( ... For this line: Item - Create a item[Random integer number between x and y] at temppoint

I can't find the "a item[Random integer number between x and y]" with my editor, can you like tell me the steps like

1) Item-create
2)...
 
Last edited:
Level 11
Joined
Sep 12, 2008
Messages
657
okay, go to item, choose the create button,
now if you made the items variable and putted it array,
you should have the option to press variable,
in the array underline area, choose math - random number
and in 1 - 10 just change to w/e you want, or how many items you got in the variable.
hope i helped..

edit:
ops.. i wrote " or how many items you got in the variable"
i meant like if there are 5 items in the variable use

  • Item - Create items[(Random integer number between 1 and 5)] at Point_Which_You_Make
 
Status
Not open for further replies.
Top