• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

What is the alternative of PauseUnit() ?

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
use channel as an ability
check the "Data - Disable other abilities"
then set how long your unit will be paused "Data - Follow through time"
that can replace the action "unit - Pause unit"
Edit: SetUnitPropWindow will disable unit's movement and works like ensnare if i'm right

Ok, thnx. So I have to give a unit this ability and remove it after use, right?
 

Rheiko

Spell Reviewer
Level 25
Joined
Aug 27, 2013
Messages
4,121
it's your decision
you can set the target type to instant
then add channel to your unit, order your unit to cast it, when you're done, remove it
Note: Don't Forget to set the "Data Base Order ID",
example: if you use thunderclap as the ID then when you want to order your unit use this action
  • Unit - Order YourUnit to Human Mountain King - Thunder Clap
Edit: as adiktuz said
 
Level 11
Joined
Oct 11, 2012
Messages
711
it's your decision
you can set the target type to instant
then add channel to your unit, order your unit to cast it, when you're done, remove it
Note: Don't Forget to set the "Data Base Order ID",
example: if you use thunderclap as the ID then when you want to order your unit use this action
  • Unit - Order YourUnit to Human Mountain King - Thunder Clap
Edit: as adiktuz said

Alrighty, thanks again.

Uhm, just use the Art - Cast animation field of the channel spell

Ok, thanks a lot!
 

nGy

nGy

Level 11
Joined
Apr 15, 2011
Messages
123
btw if you can't use that field for some reason (like the animation name is a special one), then you can set the cast animation to none then use triggers to animate the unit...
Note, that if you use the "spell cast" event for that, you will have to delay setting the unit animation. Otherwise the system will just override the animation you set with the unit's "spell" animation.
 
save the prop window first.
then set prop window to 0 via custom script.
reverse the effect once it's finished by restoring the prop window to the original.

EDIT :
Almia beats me to it.

EDIT :
You must spread some Reputation around before giving it to Almia again.
So not cool, he deserve it for explaining that thing.
 
Level 11
Joined
Oct 11, 2012
Messages
711
First save the value of the unit in a real variable:
set myRealVar = GetUnitPropWindow(myUnit)
Then, set the prop window to 0
call SetUnitPropWindow(myUnit, 0)

If you want to remove the effect, set the value of the Prop Window to the saved value:
call SetUnitPropWindow(myUnit, myRealVar)

:D

save the prop window first.
then set prop window to 0 via custom script.
reverse the effect once it's finished by restoring the prop window to the original.

EDIT :
Almia beats me to it.

EDIT :

So not cool, he deserve it for explaining that thing.

Thanks both of you. +Rep
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Try this. Press ESC to pause/unpause the paladin.


  • PauseUnit
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = Paladin 0007 <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Execution count of (This trigger)) mod 2) Equal to 1
        • Then - Actions
          • Custom script: call SetUnitPropWindow(udg_u, 0)
          • Custom script: call SetUnitTurnSpeed(udg_u, 0.00)
          • Animation - Change u's animation speed to 0.00% of its original speed
        • Else - Actions
          • Custom script: call SetUnitPropWindow(udg_u, GetUnitDefaultPropWindow(udg_u))
          • Custom script: call SetUnitTurnSpeed(udg_u, GetUnitDefaultTurnSpeed(udg_u))
          • Animation - Change u's animation speed to 100.00% of its original speed
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Make (Triggering unit) face (Facing of (Triggering unit)) over 0.00 seconds
      • Trigger - Turn on (This trigger)
 

Attachments

  • SoftPauseUnit.w3x
    15.2 KB · Views: 46
Level 11
Joined
Oct 11, 2012
Messages
711
But he wants to pause without literally pausing..
I will think about that, thnx.
Try this. Press ESC to pause/unpause the paladin.


  • PauseUnit
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = Paladin 0007 <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Execution count of (This trigger)) mod 2) Equal to 1
        • Then - Actions
          • Custom script: call SetUnitPropWindow(udg_u, 0)
          • Custom script: call SetUnitTurnSpeed(udg_u, 0.00)
          • Animation - Change u's animation speed to 0.00% of its original speed
        • Else - Actions
          • Custom script: call SetUnitPropWindow(udg_u, GetUnitDefaultPropWindow(udg_u))
          • Custom script: call SetUnitTurnSpeed(udg_u, GetUnitDefaultTurnSpeed(udg_u))
          • Animation - Change u's animation speed to 100.00% of its original speed
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Make (Triggering unit) face (Facing of (Triggering unit)) over 0.00 seconds
      • Trigger - Turn on (This trigger)

Thanks a lot!!! :ogre_haosis:

Edit:
@Maker, may I ask you what this line of JASS means in your map?
JASS:
((ModuloInteger(GetTriggerExecCount(GetTriggeringTrigger()), 2) == 1))
 
Last edited:
Status
Not open for further replies.
Top