trigger_newb
Active Member
- Reaction score
- 3
hi forums long time no see, i recently got back into mapping again so u might see me here and there
On topic:
I'm trying to create this spell copycat: the most important things to know about this spell is that:
- it creates 2 locust units (copycats) that are always 175 distance away from the caster (1 to the left of it and 1 to the right of it)
- they are ALWAYS 175 distance away from the caster (1 to the left and 1 to the right)
- they are ALWAYS facing the same angle of the caster unit
- it copies every thing the caster is doing: the walking animation, casting spells, attacking
- the 2 locust units (copycats) are copies of the casting unit, with changed color tints
The codes:
This starts the spell, summons copycats, and turns on other triggers that help run the spell.
This is what keeps the copycats continuously the same distance away from and facing the same angle as the caster. I also have a feeling this trigger doesn't allow the copycats to attack.
orders copycats to attack same unit
Basically it's supposed to queue the walking animation, i'm not quite sure why i did this lol. You have to look at this and the next code
Basically, when the caster unit reaches his point of issued order, the copycats are to stop, endnig their walking animation
After 30 seconds, copycat spell ends.
What I have right:
- the copycats are always moving with the caster (this is actually it)
Problem:
- I can't get the units to attack period
- I am not sure how to correctly detect commands (casting spells, moving, and attacking) and relay them to the copycats
Like i mentioned after the second set of codes, I think the problem is that the action unit: move unit instantly breaks unit commands and movement. But even if that is case, I have no idea how to make this spell work.
I know that I have lots of leaks, but please dont mind them yet, I just want to focus getting the skill right first, then ill clean it up later
What I need help with:
- the problems
- ideas on how I can better create this spell in GUI (last resort JASS) as I can understand it, but it takes me a long ass time to do it correctly.
Thanks in advance.
P.S. - I just attached a map, yes it has emijlr3's attribute system v4 - i attached it for fun And i'm sorry the map is superbig, I wanna fit lots and lotsa stuff in it lol.
On topic:
I'm trying to create this spell copycat: the most important things to know about this spell is that:
- it creates 2 locust units (copycats) that are always 175 distance away from the caster (1 to the left of it and 1 to the right of it)
- they are ALWAYS 175 distance away from the caster (1 to the left and 1 to the right)
- they are ALWAYS facing the same angle of the caster unit
- it copies every thing the caster is doing: the walking animation, casting spells, attacking
- the 2 locust units (copycats) are copies of the casting unit, with changed color tints
The codes:
Code:
Copycat
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Copycat
Actions
Set Copycat_Caster = (Triggering unit)
Set Copycat_Point = (Position of Copycat_Caster)
Set Copycat_Left = (Copycat_Point offset by 100.00 towards ((Facing of Copycat_Caster) + 90.00) degrees)
Set Copycat_Right = (Copycat_Point offset by 100.00 towards ((Facing of Copycat_Caster) + 270.00) degrees)
Unit - Create 1 Copycat for (Owner of Copycat_Caster) at Copycat_Left facing (Facing of Copycat_Caster) degrees
Set Copycat_West = (Last created unit)
Hero - Set Copycat_West Hero-level to (Hero level of Copycat_Caster), Show level-up graphics
Unit - Create 1 Copycat for (Owner of (Triggering unit)) at Copycat_Right facing (Facing of Copycat_Caster) degrees
Set Copycat_East = (Last created unit)
Hero - Set Copycat_East Hero-level to (Hero level of Copycat_Caster), Show level-up graphics
Trigger - Turn on Copycats Move <gen>
Trigger - Turn on Copycats Command Check <gen>
Countdown Timer - Start Copycat_Timer as a One-shot timer that will expire in 30.00 seconds
Code:
Copycats Move
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
Set Copycat_Point = (Position of Copycat_Caster)
Set Copycat_Left = (Copycat_Point offset by 100.00 towards ((Facing of Copycat_Caster) + 90.00) degrees)
Set Copycat_Right = (Copycat_Point offset by 100.00 towards ((Facing of Copycat_Caster) + 270.00) degrees)
Unit - Move Copycat_West instantly to Copycat_Left, facing (Facing of Copycat_Caster) degrees
Unit - Move Copycat_East instantly to Copycat_Right, facing (Facing of Copycat_Caster) degrees
Animation - Play Copycat_East's walk animation
Animation - Play Copycat_West's walk animation
Code:
Copycats Attack
Events
Unit - A unit Is attacked
Conditions
(Attacking unit) Equal to Copycat_Caster
Actions
Unit - Order Copycat_East to Attack (Attacked unit)
Unit - Order Copycat_West to Attack (Attacked unit)
Code:
Copycats Point
Events
Unit - A unit Is issued an order targeting a point
Conditions
(Triggering unit) Equal to Copycat_Caster
Actions
Set Copycat_Point_Caster = (Target point of issued order)
Set Copycat_Point_Left = (Copycat_Point_Caster offset by 100.00 towards 90.00 degrees)
Set Copycat_Point_Right = (Copycat_Point_Caster offset by 100.00 towards 270.00 degrees)
Unit - Order Copycat_West to Move To Copycat_Point_Left
Unit - Order Copycat_East to Move To Copycat_Point_Right
Code:
Copycats Command Check
Events
Time - Every 1.00 seconds of game time
Conditions
(Distance between Copycat_Point and Copycat_Point_Caster) Equal to 0.00
Actions
Unit - Order Copycat_East to Stop
Unit - Order Copycat_West to Stop
Code:
Copycat End
Events
Time - Copycat_Timer expires
Conditions
Actions
Unit - Remove Copycat_East from the game
Unit - Remove Copycat_West from the game
Trigger - Turn off Copycats Move <gen>
Trigger - Turn off Copycats Command Check <gen>
What I have right:
- the copycats are always moving with the caster (this is actually it)
Problem:
- I can't get the units to attack period
- I am not sure how to correctly detect commands (casting spells, moving, and attacking) and relay them to the copycats
Like i mentioned after the second set of codes, I think the problem is that the action unit: move unit instantly breaks unit commands and movement. But even if that is case, I have no idea how to make this spell work.
I know that I have lots of leaks, but please dont mind them yet, I just want to focus getting the skill right first, then ill clean it up later
What I need help with:
- the problems
- ideas on how I can better create this spell in GUI (last resort JASS) as I can understand it, but it takes me a long ass time to do it correctly.
Thanks in advance.
P.S. - I just attached a map, yes it has emijlr3's attribute system v4 - i attached it for fun And i'm sorry the map is superbig, I wanna fit lots and lotsa stuff in it lol.