- Joined
- Jul 5, 2022
- Messages
- 15
Hello everyone! I've stumbled upon a very strange bug in my trigger. If I set wait action to more than 4 seconds part of the script will not work.
The problem is in the first "wait" action. If it is set for more than 4 seconds (5 seconds for example) this part:
Everything else (even parts that goes after "for each") works perfectly. There are no reassignment of variables or something of that sort. I'm out of ideas what can possibly go wrong... I've uploaded two short videos demonstrating the issue.
-
Teleport
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to itemsTeleport[1]
-
(Item-type of (Item being manipulated)) Equal to itemsTeleport[2]
-
(Item-type of (Item being manipulated)) Equal to itemsTeleport[3]
-
(Item-type of (Item being manipulated)) Equal to itemsTeleport[4]
-
(Item-type of (Item being manipulated)) Equal to itemsTeleport[5]
-
(Item-type of (Item being manipulated)) Equal to itemsTeleport[6]
-
-
-
-
Actions
-
Set VariableSet intTmpNum = (Player number of (Owner of (Triggering unit)))
-
Set VariableSet unitTeleTarget[intTmpNum] = (Triggering unit)
-
Special Effect - Create a special effect attached to the origin of unitTeleTarget[intTmpNum] using Abilities\Spells\Human\MassTeleport\MassTeleportTo.mdl
-
Set VariableSet sfxGr[intTmpNum] = (Last created special effect)
-
Unit - Pause unitTeleTarget[intTmpNum]
-
Animation - Play unitTeleTarget[intTmpNum]'s spell,channel animation
-
Wait 4.00 seconds
-
Special Effect - Destroy sfxGr[intTmpNum]
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If ((Item-type of (Item being manipulated)) Equal to itemsTeleport[(Integer A)]) then do (Unit - Move unitTeleTarget[intTmpNum] instantly to (Center of regWaypoint[(Integer A)])) else do (Do nothing)
-
-
-
Animation - Reset unitTeleTarget[intTmpNum]'s animation
-
Unit - Unpause unitTeleTarget[intTmpNum]
-
Special Effect - Create a special effect attached to the origin of unitTeleTarget[intTmpNum] using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl
-
Set VariableSet sfxGr[intTmpNum] = (Last created special effect)
-
Wait 2.00 seconds
-
Special Effect - Destroy sfxGr[intTmpNum]
-
-
The problem is in the first "wait" action. If it is set for more than 4 seconds (5 seconds for example) this part:
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If ((Item-type of (Item being manipulated)) Equal to itemsTeleport[(Integer A)]) then do (Unit - Move unitTeleTarget[intTmpNum] instantly to (Center of regWaypoint[(Integer A)])) else do (Do nothing)
-
-
Everything else (even parts that goes after "for each") works perfectly. There are no reassignment of variables or something of that sort. I'm out of ideas what can possibly go wrong... I've uploaded two short videos demonstrating the issue.
Last edited: