• 🏆 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] Ranged Stomp doesn't work.

Status
Not open for further replies.
Level 3
Joined
Aug 22, 2009
Messages
27
Hello~~~

I've made an ability that will stun units in an area, and it has a range. I made two skills -

Blizzard, then renamed it and changed the art.
War Stomp, and assigned it as the dummy unit's skill to cast in the trigger. I changed the order string to shockwave because the "Unit - Order" trigger doesn't have "War Stomp".

My trigger doesn't work though -

  • Holy Might
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Might
    • Actions
      • Set Holy_Might_Caster = (Casting unit)
      • Set Holy_Might_Point[1] = (Target point of ability being cast)
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
      • Set Holy_Might_Dummy = (Last created unit)
      • Unit - Add Holy Might Dummy Stun to Holy_Might_Dummy
      • Unit - Add a 1.20 second Generic expiration timer to Holy_Might_Dummy
      • Unit - Set level of Holy Might Dummy Stun for Holy_Might_Dummy to (Level of Holy Might for Holy_Might_Caster)
      • Unit - Order Holy_Might_Dummy to Orc Tauren Chieftain - Shockwave (Target point of ability being cast)
Any help will be appreciated. Oh, and pictures please =). Also instructions. And variable types if needed. Thanks =)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Default abilities (other than Channel and Charge Gold and Lumber) cannot be manually changed its order string (it is hard-coded)

It will correspond to its original string order, war stomp has its action order, here:
  • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
It's under Unit - Issue Order With No Target
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
Use (Triggering Unit) instead of (Casting Unit) and leave out the variable.
Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees should contain the varaible since you're setting before.
Setting the Last created unit to a variable is unnecessry as well.
And don't forget to clean the leaks afterwards.
 
Level 30
Joined
Jan 31, 2010
Messages
3,551
Event and Conditions are fine, but you stored the variable, and then not use it, neither deny it at the end of trigger.
  • Actions
    • Set Holy_Might_Point[1] = (Target point of ability being cast)
    • Unit - Create 1 Dummy for (Owner of (Casting unit)) at (Target point of ability being cast) facing Default building facing degrees
See? Replace target point of ability being cast with your variable, and deny it at the end with this Custom Script:
  • Custom script: call RemoveLocation (udg_Holy_Might_Point[1])
You don't need a variable to declare last created unit, there is a trigger call for it: Last Created Unit. Also, in this part:
  • Unit - Order Holy_Might_Dummy to Orc Tauren Chieftain - Shockwave (Target point of ability being cast)
you will need to select War Stomp from the No target command order tab, so it will look like this: Unit - Order Holy_Might_Dummy to Orc Tauren Chieftain - War Stomp
  • If that doesn't works, make sure to either remove mana cost of the Dummy Ability, or to add some mana: regen, base and maximum to your dummy.
  • Also, what I suggest you to do is to replace the Holy_Might_Dummy/Point/every else with TempDummy / TempPoint / else; etc.
  • Why? Because, if you continue like this, you will be overflown with many random variables. When there are no timers, periodic events or wait functions used in your spell - simply use the same Temp[variable], to reduce amount of variables used, making it clean and easier to access. Also, don't forgot to deny variables, or it will leak and cause lag more it is used.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
A bit... information about the variables for sonicfreak1234 (THIS IS: JUST IN CASE, i'm not thinking you're dumb or something, it's just good to know):

Variables have that name for a reason. Their values can change within different actions and triggers. You can use TempPoint in 100 different triggers, since it will only affect that trigger actions, not the others (But never forget to clean with 'call RemoveLocation(udg_Point)').

Some variables can be set in the map initialization and they will remain like that unless you change their values after. That's why some people name their variables with no constant value with 'TEMP' suffix.

As an example, I use 'A', 'B', 'C' for units in different triggers (Unit A looks Unit B and unit B is ordered to attack Unit C with is ordered to use X skill, etc.)

Also store items in ItemType array in the Map Initialization with:
GameItem[1] = Boots
GameItem[2] = Gloves
etc...
 
Status
Not open for further replies.
Top