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

"charge" ability

Status
Not open for further replies.
Level 13
Joined
Feb 18, 2009
Messages
1,381
Hi.

I'm making a WoW map, and the warrior ofcourse needs to have Charge, but i can't make it... I've tried

  • Event :
  • Unit - A unit begins casting an ability
  • Condition :
  • Ability beign cast equal to Charge
  • Actions :
  • Unit - Set (Casting unit) movement speed to 100000
  • Wait 1.00 second
  • Unit - set casting unit movement speed to (default movement speed of casting unit)
I've seen that it dosen't work so i would try another trigger.. anybody knows any?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Because:
- 100k movement speed = 522 movement speed, you'll need a missile system for that.
- Because of the wait, the "casting unit" doesn't exist anymore if another ability is cast in the meanwhile.

You need 2 triggers for it:
  1. When the ability is cast (init ability)
  2. A timer for the ability.
You can achieve this with either indexing or hashtables (it's a lot easier with JASS though).

Your trigger is (sorry to be rude) really bad.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Well, first of all, the maximum movement speed limited by WarCraft III is 522.00; so you won't get anywhere higher than that by using "1000000000". Also, you cannot reference "Casting unit" after a "Wait"; so you'll probably need to use a timer.

** Looks like I'm a little slow on the draw.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Ok, so can anybody directly help me or are you just mocking me?
Do not double post, this is against the rules... and we're not mocking you, just telling the truth.

I don't know what charge is supposed to do (your trigger basiccaly makes the unit move faster, end of story).
A normal charge would be more like: target a unit, rush at target (high MS), deal damage and return to normal MS, right?
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
Yes, and sorry for double post.
It is supposed to be like that, use a spell on target, rush to him and normal movement speed again.
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
So, im in a bit of trouble cause they both got their plusses and minusses. I'll rep+ both but i don't know which to take xD

Pharaoh_'s :
Plusses :

Can run trough other units
Easy(ier) to make
Leaves dust
Minusses :
Dosen't look über cool (no offense!)

Ap0calypse :
Plusses :
Looks cool
Good distance
Can't move while using (well actually a minus too)

Minusses :
Can get stuck by ramming a unit which is not the target
Hard to do.

I think i'll choose ap0calypses cause it fits good, as i am making a map i will use a long time on.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I doubt they are meant for you to simply take and use, it was probably more of a way of showing you how to properly go about making something like this. This isn't a forum where people do things for you at request.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
So, i feel kinda hated, but the map was called "chargerequest"
Well yeah, tutorials can also be on request...
Either way, I don't mind if you use it or not, but try to learn instead of copy! You won't learn anything if you just ask for something here and copy the answer...

And you already feel hated? Then you shouldn't try to upload any maps in your current state or you would kill yourself :wink:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hm... and you don't have any clue why it happens? :)
If it moves to the middle, it means that a location is unknown, in this case the location of the targetted unit.
If your spell is not a unit-target spell, but a point-target, it will indeed fail miserably.

If it's a target-spell, please send me the map ;)
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
OK, fixed, now it moves to target, but no dummy image, nor any "roar" effect.
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
OK, roar works now, but i still can't get the dummy image nomatter what i do... Here is the part of the trigger which creates the dummy :
  • If/Then/Else
  • If - Conditions :
  • ChargeDistance[(ChargeInt mod 60)] equal to 0
  • Then - Actions
  • Unit - Create 1 Warrior DummyImage for (Owner of (Picked unit)) at loc3 facing (angre from loc 1 to loc 2) degrees
  • Set ChargeDummy(ChargeInt) = Last created unit
  • Unit - Add a 0.60 second generic expiration timer to ChargeDummyChargeInt
  • Animation : - Play ChargeDummy[ChargeInt]s stand animation, using only Common animations
  • Animation : Change ChargeDummy[ChargeInt]s vertex coloring to (100.00%, 100.00%, 100.00%) with 60.00% transparency.
 
Level 13
Joined
Feb 18, 2009
Messages
1,381
I've already done that... Here is full trigger, thx for tip

  • ChargeLoop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in ChargeGroup and do (Actions)
        • Loop - Actions
          • Set ChargeInt = (Custom value of (Picked unit))
          • Set ChargeDistance[ChargeInt] = (ChargeDistance[ChargeInt] + (Integer(ChargeSpeed[ChargeInt])))
          • Set Loc1 = (Position of (Picked unit))
          • Set Loc2 = (Position of ChargeTarget[ChargeInt])
          • Set Loc3 = (Loc1 offset by ChargeSpeed[ChargeInt] towards (Angle from Loc1 to Loc2) degrees)
          • Unit - Move (Picked unit) instantly to Loc3
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ChargeDistance[(ChargeInt mod 60)] Equal to 0
            • Then - Actions
              • Unit - Create 1 Warrior Image for (Owner of (Picked unit)) at Loc3 facing (Angle from Loc1 to Loc2) degrees
              • Set ChargeDummy[ChargeInt] = (Last created unit)
              • Unit - Add a 0.70 second Generic expiration timer to ChargeDummy[ChargeInt]
              • Animation - Play ChargeDummy[ChargeInt]'s stand animation, using only Common animations
              • Animation - Change ChargeDummy[ChargeInt]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 60.00% transparency
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between Loc2 and Loc3) Less than or equal to 100.00
            • Then - Actions
              • Unit Group - Remove (Picked unit) from ChargeGroup
              • Unit - Unpause (Picked unit)
              • Unit - Cause (Picked unit) to damage ChargeTarget[ChargeInt], dealing ChargeDamage[ChargeInt] damage of attack type Spells and damage type Normal
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in ChargeGroup) Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation (udg_Loc1)
          • Custom script: call RemoveLocation (udg_Loc2)
          • Custom script: call RemoveLocation (udg_Loc3)
Ohh, 150th post! Since i'm so active i'm donating 6$ to Hive :p
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Hmm... and there's no image at all (did you try checking the center of the map)?
(you might want to try removing the "Animation - Play ChargeDummy[ChargeInt]'s stand animation, using only Common animations", that line really fit in for the paladin, but perhaps your model doesn't have that animation).
 
Status
Not open for further replies.
Top