| 10-30-2009, 09:28 AM | #1 |
Hey! I am at the moment building an very big item system, including up to 682 items for every player (12 player) or more. Thus I am needing to hide / drop the item on pickup. Is it possible without triggering any of these events: JASS:
call TriggerRegisterPlayerUnitEvent(sys, Player(i), EVENT_PLAYER_UNIT_PICKUP_ITEM, b2)
call TriggerRegisterPlayerUnitEvent(sys, Player(i), EVENT_PLAYER_UNIT_DROP_ITEM, b2)
call TriggerRegisterPlayerUnitEvent(sys, Player(i), EVENT_PLAYER_UNIT_PAWN_ITEM, b2)
call TriggerRegisterPlayerUnitEvent(sys, Player(i), EVENT_PLAYER_UNIT_USE_ITEM, b2)
Thanks in advance. |
| 10-30-2009, 09:37 AM | #2 |
You can use tomes to do that, players can grab tomes even if their inventories are full. You would need 3 versions of the item: - One unit version so the player can buy it at the store even if the inventory is full - A tome version so the player can grab it from the floor even if the inventory is full - A normal version so the item actually works in the inventory xD Good luck o.o/ |
| 10-30-2009, 09:40 AM | #3 |
Yes, that exactly what I didn't want to do. I can't use the dropping because the events are then fired, thus creating endless loop. I can't disable the trigger which fires events because that library requires the other, which handles the inventory. |
| 10-30-2009, 12:45 PM | #4 | |
Quote:
It worked for me. Edit: Uhm, you can't "drop" a tome, they disappear when you try to get them o.o |
| 10-30-2009, 02:06 PM | #5 | |
Quote:
You can use call DisableTrigger(GetTriggeringTrigger()). |
| 10-30-2009, 07:06 PM | #6 | |
Quote:
He can't disable it because another trigger requires it to run. |
| 10-30-2009, 08:14 PM | #7 | |
Quote:
He can use EnableTrigger(GetTriggeringTrigger()) after whatever was triggering the infinite loop. |
| 10-30-2009, 09:23 PM | #8 | |
Quote:
|
| 10-30-2009, 09:29 PM | #9 |
It doesn't start. That was the point of DisableTrigger(GetTriggeringTrigger()). |
| 10-31-2009, 02:23 AM | #10 | |
Quote:
|
| 10-31-2009, 02:31 AM | #11 |
You design the systems intelligently so that one trigger runs after the other. |
| 11-02-2009, 07:45 AM | #12 |
Well basicly I have this: Library A Library B requires Library A (has the trigger). Now Library A is able to drop the item, but that library does not know about Library B's Trigger. |
| 11-02-2009, 01:55 PM | #13 |
It sounds like library A should be merged with library B, then. |
| 11-02-2009, 02:03 PM | #14 |
Nope, Library A is completely different to Library B, but uses the drop action. I solved it. My Library A now has a dummy trigger that will be overwritten by Library B. |
