Frozenwind
System maker
- Reaction score
- 99
I'll keep it relatively short with words.
Basically it gives me the error "Iteration detected in trigger blablbal", which is this trigger:
After doing some research I know the iteration is caused by the red marked function. Yet I don't understand why this function causes an iteration. Though I DO know it doesn't do what it is supposed to do. It finds one unit, but the found unit won't be pushed if it's within range of the PushingBullet. So it most-likely finds a different unit as it should be able to find. In fact, I assume he finds the caster...
The units within the PotentionalPushingTargets are presets for my test, basically the caster and a target, with the target being an enemy. The bullet is owned by the caster's owner. Also bullets will be added to the potentional group to make them collide later. Now, when I create multiple bullets at once, they DO push eachother, while they are allied, whereas the condition (marked red) wants to find enemies only.
Can someone explain me?
Basically it gives me the error "Iteration detected in trigger blablbal", which is this trigger:
Code:
Push movement
Events
Timer - Every 0.04 seconds of Game Time
Local Variables
Speed = 0.0 <Real>
------- Speed = Grids / Second
Conditions
Actions
------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------- SurvivorBasic
------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Variable - Set Speed = 14.0
Unit Group - Pick each unit in PushingBullets[0] and do (Actions)
Actions
Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (Speed * 0.04) towards (Facing of (Picked unit)) degrees) (Blend)
Variable - Set TempPBullet = (Picked unit)
[color=red]Unit Group - Pick each unit in (Units in PotentionalPushingTargets having alliance Enemy with (Owner of TempPBullet), with at most Any Amount) and do (Actions)[/color]
Actions
UI - Display "unit found" for (All players) to Subtitle area
General - If (Conditions) then do (Actions) else do (Actions)
If
And
Conditions
TempPBullet != (Picked unit)
(Distance between (Position of (Picked unit)) and (Position of TempPBullet)) <= 0.6
Then
UI - Display "unit pushed" for (All players) to Subtitle area
Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (Speed * 0.04) towards (Facing of TempPBullet) degrees) (Blend)
Else
Variable - Set TempPBullet = No Unit
UI - Display "-----" for (All players) to Subtitle area
The units within the PotentionalPushingTargets are presets for my test, basically the caster and a target, with the target being an enemy. The bullet is owned by the caster's owner. Also bullets will be added to the potentional group to make them collide later. Now, when I create multiple bullets at once, they DO push eachother, while they are allied, whereas the condition (marked red) wants to find enemies only.
Can someone explain me?