So I'm trying to make a spell for the Admiral Proudmoore model (the flavor being ships) with a "Call Battleship" ability that causes an off-screen "battleship" to shoot the target and stun it.
However the dummy unit I'm using doesn't cast the spell properly.
I'm currently using GUI, obviously proper code would be ideal but I'm still familiarizing myself with how everything works and GUI is easier atm.
Anyway here is the 'code':
Call Battleship
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Call Battleship (dummy)
Actions
Unit - Create 1 Dummy for (Owner of (Casting unit)) at ((Center of (Playable map area)) offset by (0.00, 0.00)) facing Default building facing degrees
Unit - Add Call Battleship (real) to (Last created unit)
Unit - Set level of Call Battleship (real) for (Last created unit) to (Level of Call Battleship (dummy) for (Casting unit))
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Wait 3.00 seconds
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Wait 3.00 seconds
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Wait 3.00 seconds
Unit - Kill (Last created unit)
Originally I thought it was doing something because the target unit was stunned indefinitely and the buff icon leveled up with the ability. However this was just because I based it off of the storm bolt ability originally. Even though I removed all effect fields and buffs it still stunned it...
It occurred to me this might a possibility while writing this and sure enough when I switched to a different spell it did nothing at all. (side note: what are good dummy spells to use that don't have weird hard coded interactions?)
If anyone could explain the obvious thing that I'm overlooking with my lack of experience that would be really appreciated.
And one more thing, is there a better way to refer to the dummy than "Last created unit"? I have a feeling this may conflict with other triggers later if left the way it is.
However the dummy unit I'm using doesn't cast the spell properly.
I'm currently using GUI, obviously proper code would be ideal but I'm still familiarizing myself with how everything works and GUI is easier atm.
Anyway here is the 'code':
Call Battleship
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Call Battleship (dummy)
Actions
Unit - Create 1 Dummy for (Owner of (Casting unit)) at ((Center of (Playable map area)) offset by (0.00, 0.00)) facing Default building facing degrees
Unit - Add Call Battleship (real) to (Last created unit)
Unit - Set level of Call Battleship (real) for (Last created unit) to (Level of Call Battleship (dummy) for (Casting unit))
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Wait 3.00 seconds
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Wait 3.00 seconds
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Wait 3.00 seconds
Unit - Kill (Last created unit)
Originally I thought it was doing something because the target unit was stunned indefinitely and the buff icon leveled up with the ability. However this was just because I based it off of the storm bolt ability originally. Even though I removed all effect fields and buffs it still stunned it...
It occurred to me this might a possibility while writing this and sure enough when I switched to a different spell it did nothing at all. (side note: what are good dummy spells to use that don't have weird hard coded interactions?)
If anyone could explain the obvious thing that I'm overlooking with my lack of experience that would be really appreciated.
And one more thing, is there a better way to refer to the dummy than "Last created unit"? I have a feeling this may conflict with other triggers later if left the way it is.