maldruzard
Member
- Reaction score
- 2
Hey there!
I have a buildable unit based on the Gate destructible, and I created a spell based on channel in order to make the gate open and close, being as you can't just make it open and close with destructible triggers.
The trigger for the spell is this:
For some reason, the new unit spawns nowhere near the location of the first one in some cases, and others it just moves a small distance away. However, every time the new open gate is not in the same position as the original closed gate. Can't figure out why
I have a buildable unit based on the Gate destructible, and I created a spell based on channel in order to make the gate open and close, being as you can't just make it open and close with destructible triggers.
The trigger for the spell is this:
Code:
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Open
(Unit-type of (Triggering unit)) Equal to Fence Gate (Horizontal)
Actions
Set Temp_Point = (Position of (Triggering unit))
Unit - Remove (Triggering unit) from the game
Unit - Create 1 Fence Gate (Horizontal) - Open for Player 1 (Red) at Temp_Point facing Default building facing degrees
Custom script: call RemoveLocation(udg_Temp_Point)
For some reason, the new unit spawns nowhere near the location of the first one in some cases, and others it just moves a small distance away. However, every time the new open gate is not in the same position as the original closed gate. Can't figure out why