HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Random Item drop in region

08-13-2004, 08:59 AM#1
Hound Archon
I want to make a trigger which drops an item every minute in a rect but it doesn't work
08-13-2004, 09:30 AM#2
kagashin
Quote:
Originally Posted by >†ReapeR†<
I want to make a trigger which drops an item every minute in a rect but it doesn't work


these ar not exact so deal with me


event: timer - periodic event every 60 seconds
condition:<<none>>
action: item - create 1 lvl (1-10) item at (random point in(<<your region>>))
08-13-2004, 10:51 AM#3
Hound Archon
it needs to drop set items which ive made not normal ones:\ :(
08-13-2004, 11:45 AM#4
logik
random integers my friend... have a play with them to find out...

to make a random item you make an integer called random_number

and then you go set random_number = random integer between number and number
08-13-2004, 12:36 PM#5
Hound Archon
:D Could you be more specific please
08-13-2004, 12:44 PM#6
logik
ok... i need more information to be more specific... like how many sets do you have? how many items in each set? excetera
08-13-2004, 12:48 PM#7
Hound Archon
at the moment 1 set 3 items
08-13-2004, 02:15 PM#8
Anitarf
Alright, here's an idea. Make an item-type variable array, where you store all your set item types (at map initialization, save each item-type to one index in the array). Then, you have your item spawning trigger, and there you do this:
Code:
create a itemTypevariable[(math-random number between 1 and (number of set items))] at itemSpawmPoint 
08-13-2004, 07:21 PM#9
Ali-B
Quicker than explaining what to do I've included a map which makes an item apper in a region every two seconds (just change it from 2 to 60)

This trigger should make any item, excluding the campain ones. To change the level of items created, change the 1 to 10 part of the line "Random integer between 1 and 10"

"Random of level -1" is any item, but it does include campain items. (level 0 items)
08-13-2004, 08:32 PM#10
Hound Archon
thnx alot i'll try it tomorrow