• 🏆 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!

Spell problem

Status
Not open for further replies.
Level 7
Joined
Feb 18, 2007
Messages
216
So I'm making simple flame strike based Ion Cannon spell. I have removed all effects and buffs from the ability and set damage to 0.

  • Events
  • Unit - A unit Finishes casting an ability
  • Conditions
  • (Ability being cast) Equal to Ion Cannon (Neutral Hostile)
  • Actions
  • Wait 1.00 seconds
  • Destructible - Create a Ion Cannon at (Target point of ability being cast) facing (Random angle) with scale 4.00 and variation 0
  • Wait 2.00 seconds
  • Destructible - Remove (Last created destructible)
  • Unit Group - Pick every unit in (Units within 500.00 of (Target point of ability being cast)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 800.00))
  • Cinematic - Fade out and back in over 1.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
So my problem is that Ion Cannon beam (destructible) doesn't appear and units are not damaged... Only thing that happens is that white flash. Anyone have an idea what's wrong?
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
Yes I have an idea whats wrong. You use a wait and the "target point of ability being cast" is lost at that time. Therefor those actions wont work, and only the cinematic action works.

How to fix? Use variables. Create a 'point' type variable, not an array, name it for example 'castpoint'. Then set the point right in the beginning of your trigger, before the wait.

Set 'castpoint' = target point of ability being cast
wait 1 seconds...
descrutible - create a ion cannon at 'castpoint' facing random angle with scale 4.00 and variation 0
etc.
etc.

Got it?
 
Level 7
Joined
Jul 14, 2006
Messages
292
Yes I have an idea whats wrong. You use a wait and the "target point of ability being cast" is lost at that time. Therefor those actions wont work, and only the cinematic action works.

How to fix? Use variables. Create a 'point' type variable, not an array, name it for example 'castpoint'. Then set the point right in the beginning of your trigger, before the wait.

Set 'castpoint' = target point of ability being cast
wait 1 seconds...
descrutible - create a ion cannon at 'castpoint' facing random angle with scale 4.00 and variation 0
etc.
etc.

Got it?


Bad idea... If a unit cast the spell 1 second before another does, the spell will be casted twice at the second spot.
And you will have a leak because you are keeping the point and the group. :/
Well it depend on it's use. If you are planing only 1 unit or a few to being able to cast it, it would be ok.
 
Level 7
Joined
Feb 18, 2007
Messages
216
Bad idea... If a unit cast the spell 1 second before another does, the spell will be casted twice at the second spot.
And you will have a leak because you are keeping the point and the group. :/
Well it depend on it's use. If you are planing only 1 unit or a few to being able to cast it, it would be ok.
That's not problem because it's ultimate spell wich can be casted once in 5 minutes.
 
Level 16
Joined
Oct 30, 2004
Messages
1,277
Bad idea... If a unit cast the spell 1 second before another does, the spell will be casted twice at the second spot.
And you will have a leak because you are keeping the point and the group. :/
Well it depend on it's use. If you are planing only 1 unit or a few to being able to cast it, it would be ok.

There's a time and place for everything. I wasnt going to confuse him talking about MUI or leaks since his problem was very very basic one.
 
Level 7
Joined
Jul 14, 2006
Messages
292
Ha ok. XD sorry then. But I still think that he should use (Unit- Damage target for.... etc) because with (Unit - Set life of UNIT) he may harm things he didn't want to like neutral invulnerable building.
I just want to help XD. In my opinion the trigger would be:


IonCannonPoint = Point type variable
  • Events
  • Unit - A unit Finishes casting an ability
  • Conditions
  • (Ability being cast) Equal to Ion Cannon (Neutral Hostile)
  • Actions
  • Set IonCannonPoint = (target point of ability being cast)
  • Wait 1.00 seconds
  • Destructible - Create a Ion Cannon at (IonCannonPoint) facing (Random angle) with scale 4.00 and variation 0
  • Wait 2.00 seconds
  • Destructible - Remove (Last created destructible)
  • Unit Group - Pick every unit in (Units within 500.00 of (IonCannonPoint)) and do (Unit - Cause (Casting Unit) to damage (picked unit), dealing 800.00 damage of attack type Chaos and damage type Normal))
  • Cinematic - Fade out and back in over 1.00 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
 
Status
Not open for further replies.
Top