Slide had pause my unit

asipo

New Member
Reaction score
15
Hi
I want to make my unit sliding on ice
I make every 0.04 seconds, the unit will move in front of it
This work nicely and have no problem at all.

My problem rite now is the unit have an ability Thunder Clap
When I try to cast it, the unit will not cast it.

This is maybe because of the rapid movement (the sliding) of the unit
cause my unit unable to cast it

I have try to disable the trigger when the unit is casting an ability
But it seems not to smooth enough like I want it

Is there any solution for this?
 
Reaction score
86
Let me see ur slide trigger. When u use set unit location it will interupt unit actions so you have to use setunitX and setunitY (jass)
 

asipo

New Member
Reaction score
15
Trigger:
  • Untitled Trigger 001
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit - Move Gryphon Rider 0029 <gen> instantly to ((Position of Gryphon Rider 0029 <gen>) offset by 10.00 towards (Facing of Gryphon Rider 0029 <gen>) degrees), facing ((Facing of Gryphon Rider 0029 <gen>) + 1.00) degrees


Well, actually its not sliding on ice
But im making sliding + control with keyboard (i already done this)
The given trigger is the sliding part (the crucial part)
The testing unit is Gryphon Rider 0029 <gen>

I try to make the unit have 2 ability
Thunder clap and Flame breath

Unable to cast the flame breath even im already click the target
because of the sliding i guess

did i need to post my map?

p/s:
note that im not using move instantly on X and Y.
The trigger i use above still works and i think better that move instantly on X and Y...i guess
(I still dont consider the leak part)
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
the action "unit - move unit to position" does remove all given order of the unit. you can use jass to set the units X/Y to a different point however this will enable your unit to move/attack/etc just like an ordinery unit.

the jass lines would look something similar to this:
Trigger:
  • Custom script: call SetUnitX( GetEnumUnit(), GetLocationX(udg_TempPoint))
    • Custom script: call SetUnitY( GetEnumUnit(), GetLocationY(udg_TempPoint))
 
Reaction score
86
heres how, make a custom script and do call SetUnitX(Unit, GetUnitX(Unit)+10*Cos(GetUnitFacing(Unit)*bj_DEGTORAD)) and then

call SetUnitY(Unit, GetUnitY(Unit)+10*Sin(GetUnitFacing(Unit)*bj_DEGTORAD))
 

asipo

New Member
Reaction score
15
Problem solve and works...Thanks to accname & Infinitegde
Looks like i cant run from jass...
And making unit movement based on X and Y is a math
(i hate that since my testing map involve unit acceleration)

accname help me 2 times in a day
I guess you must have involve and get alot of exp in making sliding unit
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top