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

trigger that casts a spell?

Status
Not open for further replies.
Level 4
Joined
Jul 18, 2008
Messages
76
hi.

Ive got this little Dwarf that has the normal Pulverize spell, damages all units around himself.

I tried to make another spell, (dummy), that is learned and tells the player what the background trigger does.

Now, i almost finished the simple trigger but got stuck.

It looks like this.

Unit - A unit is attacked

Unit-type of Attacked Unit equal to Dwarf
Random Integer number beetween 1 and 100 Greater than or equal to 83

The action i need is that the Dwarf should cast his Pulverize spell.

Dont care of the level of the pulverize or the dummy spell, i got it all fixed except for this damn action.
 
Level 4
Joined
Jul 18, 2008
Messages
76
well then the hero must have a thunderclap spell, and that he will not. So i guess this spell wont work.
 
well, since you want to base it on pulverize, you can do it easily with triggers.

  • Melee Initialization
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Triggering unit) Equal to No unit
      • (Random integer number between 1 and 100) Equal to 1
    • Actions
      • -------- -------------------------------------------------------------------- --------
      • -------- Needed variables: --------
      • -------- temppoint = Point variable --------
      • -------- -------------------------------------------------------------------- --------
      • Set temppoint[1] = (Position of (Attacked unit))
      • -------- -------------------------------------------------------------------- --------
      • -------- The special effect --------
      • Special Effect - Create a special effect at temppoint[1] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
      • -------- -------------------------------------------------------------------- --------
      • -------- -------------------------------------------------------------------- --------
      • -------- This destroys the special effect, for leakless trigger --------
      • Special Effect - Destroy (Last created special effect)
      • -------- -------------------------------------------------------------------- --------
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units within 450.00 of temppoint[1] matching ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an enemy of (Owner of (Casting unit))) Equal to True))) and do (Actions)
        • Loop - Actions
          • -------- -------------------------------------------------------------------- --------
          • -------- The damage --------
          • Unit - Cause (Casting unit) to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
          • -------- -------------------------------------------------------------------- --------
      • -------- -------------------------------------------------------------------- --------
      • -------- This destroys point, for leakless trigger --------
      • Custom script: call RemoveLocation(udg_temppoint[1])
      • -------- -------------------------------------------------------------------- --------
 
Status
Not open for further replies.
Top