- Joined
- Oct 5, 2012
- Messages
- 67
I want to make a map, where no one could own a item twice (or the second one will have no effect). Is there a way to do this by triggers?
Simple solution without a counter is to drop the item from the hero at the start of the trigger, and give it back to the hero later on when it is determined that they don't have it. Don't forget to turn off/turn on the trigger before/after giving the item back to prevent an infinite loop.
That won't work with drop order though,cuz
since the unit recieves the order the trigger continues and finishes before actually the unit drops the item:S
Are you sure it includes my trigger as well ?But there is a main problem with all of these triggers.
What do you meant by "repeatedly pick up two items" ?If you repeatedly pick up two items, occasionally it ends with picking one up even if you already have 1 like it
EDITED:
defskull is right, but this is just enough
- SSIPS Event
- Events
- Unit - A unit Acquires an item
- Conditions
- Actions
- Set TempUnit = (Triggering unit)
- Set TempItem = (Item being manipulated)
- For each (Integer LoopingInteger) from 1 to 6, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Item-type of TempItem) Equal to (Item-type of (Item carried by TempUnit in slot (Integer A))
- TempItem Not Equal to (Item carried by TempUnit in slot (Integer A))
- Then - Actions
- Hero - Drop TempItem from TempUnit
- Else - Actions
doesn't work