- Joined
- Oct 11, 2012
- Messages
- 711
Alright, PauseUnit() is bad, so what should we use when we wanna pause a unit? Thanks guys.
SetUnitPropWindow
Hmm,
you can you it instead of pause unitJASS:SetUnitPropWindow
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
Give it to the unit
Order it to cast
*Removal is only if the icon is shown... if the ability is not set as visible, then you don't really need to remove it
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
Edit: as adiktuz said
- Unit - Order YourUnit to Human Mountain King - Thunder Clap
Uhm, just use the Art - Cast animation field of the channel spell
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.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...
SetUnitPropWindow(<myUnitHere>, 0)
as an alternative. You must cache first its original window. set myRealVar = GetUnitPropWindow(myUnit)
call SetUnitPropWindow(myUnit, 0)
call SetUnitPropWindow(myUnit, myRealVar)
So not cool, he deserve it for explaining that thing.You must spread some Reputation around before giving it to Almia again.
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)
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.
where's my rep??
i'm the one who ask almia
nevermind, Lol xD
what? you want to say that i'm hungry of reps? no no no@Rheiko
I liked you before, now I never thought that you were different.
A Hungry User.
Adjuting propulsion window still allows the unit to turn.
You can set turn rate to 0 to counter that, but event with the rate of 0 the unit can still turn, albeit very slowly. You can periodically reset the facing.
|
I will think about that, thnx.But he wants to pause without literally pausing..
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)
((ModuloInteger(GetTriggerExecCount(GetTriggeringTrigger()), 2) == 1))