• 🏆 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] Spell Problem

Status
Not open for further replies.
Level 17
Joined
Jun 12, 2007
Messages
1,261
I have a spell called enrage, and I want it to create 4 shockwaves outwards creating a +.
My spell however makes the dummy only cast it at facing of triggering unit + 0 degree, and goes lick fuck off to the 90, 180 and 270 degree casting.
How can I solve this?

Here is the trigger:

  • Enrage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Enrage [E]
    • Actions
      • Set CasterPoint[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))
      • Floating Text - Create floating text that reads (PlayerColor[(Player number of (Owner of (Triggering unit)))] + ([Enrage - Rank + ((String((Level of Enrage [E] for (Triggering unit)))) + ]))) at CasterPoint[(Player number of (Owner of (Triggering unit)))] with Z offset 0.00, using font size 9.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 15.00 towards (Random real number between 50.00 and 90.00) degrees
      • Set CastPoint[(Player number of (Owner of (Triggering unit)))] = (CasterPoint[(Player number of (Owner of (Triggering unit)))] offset by 200.00 towards ((Facing of (Triggering unit)) + 0.00) degrees)
      • Set CastPoint2[(Player number of (Owner of (Triggering unit)))] = (CasterPoint[(Player number of (Owner of (Triggering unit)))] offset by 200.00 towards ((Facing of (Triggering unit)) + 90.00) degrees)
      • Set CastPoint3[(Player number of (Owner of (Triggering unit)))] = (CasterPoint[(Player number of (Owner of (Triggering unit)))] offset by 200.00 towards ((Facing of (Triggering unit)) + 180.00) degrees)
      • Set CastPoint4[(Player number of (Owner of (Triggering unit)))] = (CasterPoint[(Player number of (Owner of (Triggering unit)))] offset by 200.00 towards ((Facing of (Triggering unit)) + 270.00) degrees)
      • Animation - Reset (Triggering unit)'s animation
      • Animation - Play (Triggering unit)'s Stand Victory animation
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at CasterPoint[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
      • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Unit - Add (D) Enrage to (Last created unit)
      • Unit - Set level of (D) Enrage for (Last created unit) to (Level of Enrage [E] for (Triggering unit))
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CastPoint[(Player number of (Owner of (Triggering unit)))]
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CastPoint2[(Player number of (Owner of (Triggering unit)))]
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CastPoint3[(Player number of (Owner of (Triggering unit)))]
      • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CastPoint4[(Player number of (Owner of (Triggering unit)))]
      • Custom script: set bj_wantDestroyGroup = true
      • Custom script: call RemoveLocation(udg_CastPoint[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_CastPoint2[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_CastPoint3[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_CastPoint4[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_CasterPoint[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
EDIT: I don't want to hear, check if the spell for dummy has cooldown or mana cost blablabla, that's all fine.
 
Level 5
Joined
Dec 6, 2008
Messages
124
Shockwave+.jpg
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
I think you must wait a bit, like 0.1 second before casting it in other directions, I'm not sure thou. Did you set the cooldown to 0? And manacost?

Read the post better:

EDIT: I don't want to hear, check if the spell for dummy has cooldown or mana cost blablabla, that's all fine.

I don't like waits, I want it to be MPI at least.
 
Level 18
Joined
Sep 27, 2005
Messages
2,069
Sorry didn't see the Edited part. Anyway you could maybe make a trigger for when the shockwave is cast first time:

unit begins the efect of abiliry
= shockwave
set a = a + 1 ( a is initialy 1 )
Set CastPoint[(Player number of (Owner of (Triggering unit)))] = (CasterPoint[(Player number of (Owner of (Triggering unit)))] offset by 200.00 towards ((Facing of (Triggering unit)) +a x 90) degrees)

Maybe this would work you just add exp. timer and all the other stuff.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • For each Integer A from 1 to 4 do:
    • Set Castpoint = (CasterPoint offset by 200.00 towards ((Facing of (Triggering unit)) + x) degrees)
    • Unit - Create 1 dummy at Casterpoint for (Owner of (Tiggering Unit) facing x degrees
    • Unit - Add a 3 seconds standard expirationtimer to (last created unit)
    • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CastPoint
    • Set x = (x + 90.00)
    • Custom script: call Remove(udg_Castpoint)
  • Set x = 0.00
Whereas x is a real whch is increased by 90 everytime the loop runs.
Plus, as I was told, you don't need Arrays for that
 
Status
Not open for further replies.
Top