• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell Unit or Point Target with dummy

Status
Not open for further replies.
Level 3
Joined
Jul 27, 2012
Messages
33
Basically i create spell with "Channel" ability with target type to Unit or Point Target, i triggered it by dummy unit, so like fireball dummy. I can move the dummy either unit or point target. but i can't triggered both, So I want to make spell,. if I targeted Point (target point of ability being cast), fireball will move to the Point target and damage every unit past over by fireball with certain distance.
And if I targeted Unit, fireball will move(chase) to target unit of ability being cast, and only damage the targeted unit only,. I have tried before, the problem is no condition that if I targeted point of ability being cast. Can this one ability possibly to target unit or point with trigger?
this my basic loop move trigger..
Basic.JPG
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Create a trigger
event: unit starts tge effect of an ability
create timer with 0 time
make it set targeted unit of ability being cast to null

then you can detect in your other trigger wether a unit is targeted or not
I csnnot give an example of the trigger so i hope that you understand this
 
Level 7
Joined
Jun 15, 2010
Messages
218
I have had the same problem as you, what i did is: check if unit is alive (boolean condition). If you selected a unit then the target must be alive. Else if you selected the ground, this turns false

very ez sollution
 
Level 3
Joined
Jul 27, 2012
Messages
33
ok thx for information chaosy, next time i will post in world editor help zone,
I have had the same problem as you, what i did is: check if unit is alive (boolean condition). If you selected a unit then the target must be alive. Else if you selected the ground, this turns false

very ez sollution
how u check "if you selected ground" ?
previously, i set angle[0] angle between caster to target-point, and angle[1] angle between dummy to target-unit, if i target to unit, the dummy move perfect, but if i target point, angle of dummy change, and not move to point target precisely

  • SolarBeam
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to SOLAR BEAM
    • Actions
      • Set SBeam_Caster = (Casting unit)
      • Set SBeam_Target = (Target unit of ability being cast)
      • Set SBeam_Point[0] = (Position of SBeam_Caster)
      • Set SBeam_Point[1] = (Target point of ability being cast)
      • Set SBeam_Angle[0] = (Angle from (Position of SBeam_Caster) to (Target point of ability being cast))
      • Set SBeam_Distance[0] = 1000.00
      • Set SBeam_Distance[1] = (Distance between (Position of SBeam_Caster) and (Position of SBeam_Target))
      • Set SBeam_Speed[0] = 3.00
      • Unit - Create 1 SolarBeamDummy for (Owner of SBeam_Caster) at (SBeam_Point[0] offset by 30.00 towards SBeam_Angle[0] degrees) facing SBeam_Angle[0] degrees
      • Set SBeam_Dummy[0] = (Last created unit)
      • Set SBeam_Angle[1] = (Angle from (Position of SBeam_Dummy[0]) to (Position of SBeam_Target))
      • Trigger - Turn on SBeamLoop <gen>
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
Event: Unit starts the effect of an ability
Condition: Ability being cast equal to Solar Beam
Actions:
If (Targeted unit of ability being cast is alive)#1 then
"Ability is cast on a unit. Use Targeted unit of ability being cast as the unit."
else
"Ability is cast on ground. Use Targeted poin of ability being cast as the location."

#1 (could probably also be not equal to no unit)
 
Status
Not open for further replies.
Top