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

why my spell doesnt work

Status
Not open for further replies.
Level 3
Joined
Jan 13, 2008
Messages
28
why this trigger doesnt work


Event:
unit - a unit starts effect of an ability

Conditions:
(Ability being cast) equal to -my spell-

Actions:
Unit - cause (triggering unit) to damage (target unit of ability being cast), dealing -dmg- damage of attack type chaos and damage type normal

Animation - change (Target unit ability being cast)`s vertex coloring to (-my things-) with -my thing- transparency

Special Effect - Create a special effect attached to the -my thing- of (Target unit of ability being cast) using -choosed model-

Wait - 2 second

and etc same things
 
Level 3
Joined
Sep 13, 2008
Messages
63
Post your whole code and use the trigger tags.

Example:
  • Untitled Trigger 003
    • Events
      • Map initialization
    • Conditions
      • 0 Equal to 0
    • Actions
      • Do nothing
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
Rework your triggers, you first need this one:

  • Events Unit begins casting an ability
  • Conditions Ability being cast equal *your_ability*
  • Actions
    • Set variable *caster* = casting unit
    • Set variable *victim* = target unit of ability being cast
  • Events Unit starts the effect of an ability
  • Conditions Ability being cast equal *your_ability*
  • Actions
    • Unit cause *caster* to damage *victim* dealing -dmg- damage of attack type chaos and damage type normal
    • Animation - change *victim*s vertex coloring to (-your things-) with (-your things-) transparency
    • Special effect - Create an special effect attached to -your thing- of *victim* using -chosen model
    • Wait 2 seconds
    • and etc the same thing
Also you should check your triggers for memory leaks.
 
Level 3
Joined
Jan 13, 2008
Messages
28
okay my problem is this:
i have used special effect and dmg trigger and its works just one time trigger is like "special effect dmg and change color to being cast unit" then wait 2 second and its do it again but it doesnt work "special effect and dmg" comes just only one time


(-special question-)
how i can "show" the trigger like kingz ?
 
Level 3
Joined
Jan 13, 2008
Messages
28
  • Corpse Explosion
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Corpse Explosion
    • Actions
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 20.00 damage of attack type Chaos and damage type Normal
      • Animation - Change (Target unit of ability being cast)'s vertex coloring to (100.00%, 75.00%, 75.00%) with 0.00% transparency
      • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
      • Wait 2.00 seconds
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 20.00 damage of attack type Spells and damage type Normal
      • Animation - Change (Target unit of ability being cast)'s vertex coloring to (100.00%, 50.00%, 50.00%) with 0.00% transparency
      • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
      • Wait 2.00 seconds
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 20.00 damage of attack type Spells and damage type Normal
      • Animation - Change (Target unit of ability being cast)'s vertex coloring to (100.00%, 25.00%, 25.00%) with 0.00% transparency
      • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
      • Wait 2.00 seconds
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 20.00 damage of attack type Spells and damage type Normal
      • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
      • Animation - Change (Target unit of ability being cast)'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 2.00 seconds
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 20.00 damage of attack type Spells and damage type Normal
      • Animation - Change (Target unit of ability being cast)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Special Effect - Create a special effect attached to the chest of (Target unit of ability being cast) using Objects\Spawnmodels\Undead\UndeadLargeDeathExplode\UndeadLargeDeathExplode.mdl
(-fixed-)
looks better now ?

whats wrong is in this spell
 
Last edited:
Level 4
Joined
Mar 15, 2008
Messages
71
you should store the (Target Unit of ability being cast) into a variable like this :
  • Actions
    • Set UnitX = (Target Unit of ability being cast)
at the beginning of you Actions ,and instead of using (Target Unit of ability being cast) always as the target of your functions use UnitX or whatever...this should fix your problem because when you use the wait function the (Target Unit of ability being cast) is set to null I think or something like that,just try this and tell me what happens ^^
 
Status
Not open for further replies.
Top