| 06-18-2004, 10:36 PM | #1 |
Hey. I got a little "adrenaline" system in my map, which is based off the Unreal Tournament games. It is an item, that spawns all over the map, and can be used to give yourself "adrenaline points". Now what I need is, a system where once I pick up adrenaline pills, another will spawn in its place after X seconds. Except there are about 41 places... Its kind of like weapon spawns in almost every other game. What would be the fastest, and most efficient way of creating this "item spawn" system? |
| 06-19-2004, 04:10 AM | #2 |
umm Code:
Event: Hero acquires an item Condition: Item type of manipulated item = adrenaline Action: Wait 30 secodns Create 1 adrenaline as position of manipulated item That will leak locations, but screw it I forgot how to do local variables. |
| 06-19-2004, 05:24 AM | #3 |
I can see it working, except for one small little problem if these items are picked up in a series, only the last one in the series will actually be created, since the trigger is reset everytime the event is satisfied. |
| 06-19-2004, 05:13 PM | #4 |
What? Have you tested this? It'll work for every one you pick up. Handles (in this case, "manipulated item") are NOT lost when you have wait actions. In that way it is different from the "last created XXYY" reference. |
| 06-19-2004, 08:43 PM | #5 |
alright, you were right i was wrong but... anyone know how to do the local variables and still get what i want? |
| 06-19-2004, 09:29 PM | #6 |
how to declare locals in GUI: Custom Script: local <variable type> <udg_variable name> You'll have to have to create a global variable with the same name and when declaring make sure you use udg_variablename. This will make i multi-instacable. Here's the JASS names for locals: Code:
World Editor Name | Real variable type name ____________________|_________________________ Boolean | boolean Destructible | destructable Dialog | dialog Dialog Button | button Floating Text | texttag Integer | integer Item | item Leaderboard | leaderboard Player | player Player Group | force Point | location Real | real Region | rect Special Effect | effect String | string Terrain Deformation | terraindeformation Timer | timer Timer Window | timerdialog Unit | unit Unit Group | group Unfortunnally , Order , Ability , Unit Type, Destructible type, and Item type cannot be used because they are in fact integers, you can use local integer variables but you'll need to convert to JASS every single line you are planning to use the local variable Hope i helped. |
| 06-19-2004, 10:07 PM | #7 | |
Quote:
|
