How to: Slide

mems

Memory Lapse
Reaction score
24
Kubanator said:
caster should be unit not unit-type

- Sorted thanks for pointing this
- an others are u answering a deleated question? couse i didnt figured it out

note: A tutorial should be as long as it possible to make peple sure about what they doing...
 

Oreo_clan

New Member
Reaction score
4
Well... In GUI, you can make it work for multiplayer. But it causes lag. You can set TempUnitGroup to units in playable map area with buff of Slide.
Then do the action for each one. Maybe set N and distance to an array. Well either way, mine goes off every .01 seconds... Hence, the lag. Anyway, it has to be .01 because it also has to check to see if a unit is close enough to be hit. (Custom Missles) And the AoE is small. As small as 40, so the unit can't move more than 40 at a time, and it has to move about 1325... Hence the dilema. Any suggestions to fix it?
 

SuperSoldier

New Member
Reaction score
10
GREEN!!! lol

so if uve seen the amount of my posts round 5-7 or sumwhere round there i havnt been to many tuts n stuff this is a great tut and wouldnt it be simpler to just
(btw for an example use a blademaster wit no spells but bladestorm(wit a 5 sec durration)) unit casts a spell, spell is bladestorm then not allow casting unit to move or sumthin, wait .5 secs move unit 9(or wutever the distance) infront of casting unit and repeat untill 10 times then allow to move(this is just an example)
btw im at dads work using spare comp so i dont hav w3 installed on it :eek:
the bm was just an example to also do dmg but if u want sumthin else not doin dmg, i suggest u just use shockwave wit no dmg n no skin/model
 

SuperSoldier

New Member
Reaction score
10
or u could take impale, make it hav no skin/model, take the range and use it in the way i did it but sumhow (like i said i cant check any mistakes wit triggers n stuff) make it not channeled and make urself hav a certain animation/pose while ur "sliding" the range to the end where the impale would end. in other words its like a dash atck so it dmgs n stunns the guys, but how to not make em go up in air, u could just say u throw em up in the air, or sumhow (i dont even kno if u can) make them not go into air
:banghead: :banghead: :banghead: :banghead: :banghead: :banghead:

also i forgot to mention pause the guy so he cant turn and go the other way
 
M

MysterySoul

Guest
Er, how do i make a unit move or such while it's cinematic or animated cutscene?
 

Weyrling

New Member
Reaction score
25
Just Wondering..

Why did you do this in JASS? this is alot more complicated than doing it in GUI, takes more variables and does more things, which I imagine would lag more, though I haven't tested that. I'm not trying to bash you or anything, as I did learn from this tutorial, as it is well-written and easily understandable, but it seems to me that you're overcomplicating it.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
715
This trigger is already MUI I think.

Code:
sliding
    Events
        Time - timer expires
    Conditions
    Actions
        Custom script:   set bj_wantDestroyGroup = true
        Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
            Loop - Actions
                Set picked = (Picked unit)
                Set regular = (Position of picked)
                Set facing = (Facing of picked)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Terrain type at regular) Equal to Northrend - Ice
                    Then - Actions
                        Set polar = (regular offset by 7.50 towards facing degrees)
                        Unit - Move picked instantly to polar
                        Custom script:   call RemoveLocation(udg_polar)
                    Else - Actions
                        Custom script:   call RemoveLocation(udg_regular)

And to start it.

Code:
starttimer
    Events
        Time - Elapsed game time is 0.00 seconds
    Conditions
    Actions
        Countdown Timer - Start timer as a Repeating timer that will expire in 0.03 seconds

Smooth sliding timer.:cool: :eek:
 

mems

Memory Lapse
Reaction score
24
Why did you do this in JASS? this is alot more complicated than doing it in GUI, takes more variables and does more things, which I imagine would lag more, though I haven't tested that. I'm not trying to bash you or anything, as I did learn from this tutorial, as it is well-written and easily understandable, but it seems to me that you're overcomplicating it.

Well there are loads of reasons to make this with jass.
- First of all when u save ur map this gui triggers are already turning into jass outomatically. This transform creates loads of leaky functions, variables and waste text.

- Second and most important reason is when u make it with Gui u will need much more variables to hold the event. i mean if ur map is for 8 players u will need 8x more triggers and variables for each player to make the spell multiinstancable. i mean u need to be sure about 2 or more units can cast this spell at same time withouth overwritting their variables.

- It seems complicated couse its the very basic method to make this ting. im sure u will find better ways to make the units slide around freeley after learning better jass. With jass we use game catche which is very fast. And all that variables that are used in Jass are just local and get destroyed after execution. If u compare the gui and Jass triggers for this spell with very sensitive tools u will see jass is at least 5x faster and less leaky than gui.

- and my personal, when u learn jass im sure that u will never do anything with gui again be sure that :)
 

U are a noob

Mega Super Ultra Cool Member
Reaction score
152
The gui one can be made into one trigger:
Code:
Slide Init
    Events
        Unit - A unit Starts the effect of an ability
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Ability being cast) Equal to Slide GUI 
            Then - Actions
                Set Caster = (Casting unit)
                Set CasterPosition = (Position of Caster)
                Set TargetPoint = (Target point of ability being cast)
                Set Distance = (Distance between CasterPosition and TargetPoint)
                Set Angle = (Angle from CasterPosition to TargetPoint)
                Set N = 0.00
                Wait 0.20 seconds
                Unit - Pause Caster
                Animation - Play Caster's spell channel animation
                Unit - Turn collision for Caster Off
                Set On = True
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                On Equal to True
            Then - Actions
                Set CasterPosition = (Position of Caster)
                Set MoveToPoint = (CasterPosition offset by 20.00 towards Angle degrees)
                Set N = (N + 20.00)
                Unit - Move Caster instantly to MoveToPoint
                Special Effect - Create a special effect attached to the origin of Caster using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                Special Effect - Destroy (Last created special effect)
                Custom script:   call RemoveLocation(udg_MoveToPoint)
                Custom script:   call RemoveLocation(udg_CasterPosition)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (N Greater than or equal to Distance) or ((Caster is dead) Equal to True)
                    Then - Actions
                        Unit - Unpause Caster
                        Unit - Turn collision for Caster On
                        Animation - Reset Caster's animation
                        Custom script:   set udg_Caster = null
                        Custom script:   call RemoveLocation(udg_MoveToPoint)
                        Set On = False
                    Else - Actions
            Else - Actions
 

mems

Memory Lapse
Reaction score
24
Sorry but this trigger will always run, checks conditions and do actions on whole game time. Why we need extra job?
 

Demi666

New Member
Reaction score
127
long slide in gui..

there is easierways... very much easyer..

Code:
RedSkate
    Events
        Time - Every 0.03 seconds of game time
    Conditions
        (Terrain type at (Position of RedHeroV)) Equal to Northrend - Ice
        (Player 1 (Red) controller) Equal to User
        (Player 1 (Red) slot status) Equal to Is playing
    Actions
        Unit - Move RedHeroV instantly to ((Position of RedHeroV) offset by 13.00 towards (Facing of RedHeroV) degrees)

for the sliding and this 1 is for movin

Code:
RedMSlide
    Events
        Unit - Survivor 0007 <gen> Is issued an order targeting a point
    Conditions
    Actions
        Unit - Move RedHeroV instantly to (Position of RedHeroV), facing (Target point of issued order)
        Unit - Make RedHeroV face (Target point of issued order) over 0.00 seconds

it works with variabels to.. if u set the unit in variable or "picked unit"

:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D
 

turok255

New Member
Reaction score
30
Okay i have your trigger in my map.. now how do i make it so it slides into a unit i choose and that unit takes XXX damage

XXX = diffrent damage per level of ability

Do i just set the ability he uses? not the dummy ability but the channle ability i think it was

My goal is to have an ability based off of shock wave but the hero slides into enemy instead of that big yellow blurr the tauren cheif shoots lol

If you have played Mortal Kombat you should know im trying to base it off of one of the mortal kombat characters slide moves (Retile's speedy serpant)

EDIT:also my slide trigger dosen't work it just pauses my hero then unpauses heres my triggers

Code:
Speedy Serpant
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Speedy Serpant (Dummy)
    Actions
        Set Caster = (Casting unit)
        Set CasterPosition = (Position of Caster)
        Set TargetPoint = (Target point of ability being cast)
        Set Distance = (Distance between CasterPosition and TargetPoint)
        Set Angel = (Angle from CasterPosition to TargetPoint)
        Set N = 0.00
        Wait 0.20 seconds
        Unit - Pause Caster
        Animation - Play Caster's channel animation
        Unit - Turn collision for Caster Off
        Trigger - Turn on Slide Effect <gen>

Code:
Slide Effect
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set N = (N + 20.00)
        Set CasterPosition = (Position of Caster)
        Set MoveToPoint = (CasterPosition offset by 20.00 towards Angel degrees)
        Unit - Move Caster instantly to MoveToPoint
        Special Effect - Create a special effect attached to the origin of Caster using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_MoveToPoint)
        Custom script:   call RemoveLocation(udg_CasterPosition)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (N Greater than or equal to Distance) or ((Caster is dead) Equal to True)
            Then - Actions
                Unit - Unpause Caster
                Unit - Turn collision for Caster On
                Animation - Reset Caster's animation
                Custom script:   set udg_Caster = null
                Custom script:   call RemoveLocation(udg_MoveToPoint)
                Trigger - Turn off (This trigger)
            Else - Actions

PS: Do i HAVE to have the Do Nothing in the trigger for els actions because if not mithic told me its unnessisary and makes trigger lagg
 

mems

Memory Lapse
Reaction score
24
if u are sliding to a unit u should change the conditions of whole trigger.
First of all u moving point should be the target point and u should always check this target point if target is moveable.

then finish the sliding if your caster is near or in that point after that put a code to the trigger that finishes the sliding which also deals demage to target.

sorry guys im a soldier now and i dont have time or any computer to answer such questions quickly
 
L

lolsauce

Guest
Is there any way to make a whole area of units slide towards a particular unit? Like, say if a particular unit casts a spell based off of Starfall, is it possible to make all the units surrounding it, slide towards it?
 

mems

Memory Lapse
Reaction score
24
Surely possibble

Code:
a unit casts the spell
pick every units around casting unit with a spesific range and do actions
       register local variables for picked unit
       start slide for picked unit
 

X-maul

AKA: Demtrod
Reaction score
201
okay this is my proplem...
Code:
Slide Init
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Slide Chrush 
    Actions
        Set Caster_slide = (Casting unit)
        Set CosterPosition_Slide = (Position of (Casting unit))
        Set TargetPoint_Slide = (Target point of ability being cast)
        Set Distance_Slide = (Distance between CosterPosition_Slide and TargetPoint_Slide)
        Set Angle_Slide = (Angle from CosterPosition_Slide to TargetPoint_Slide)
        Set N_Slide = 0.00
        Wait 0.20 seconds
        Unit - Pause Caster_slide
        Animation - Play Caster_slide's spell channel animation
        Unit - Turn collision for Caster_slide Off
this thing works fine, but...
Code:
Slide Effect
    Events
        Time - Every 0.03 seconds of game time
    Conditions
    Actions
        Set N_Slide = (N_Slide + 20.00)
        Set CosterPosition_Slide = (Position of Caster_slide)
        Set MoveToPoint_Slide = (CosterPosition_Slide offset by 20.00 towards Angle_Slide degrees)
        Unit - Move Caster_slide instantly to MoveToPoint_Slide
        Special Effect - Create a special effect attached to the origin of Caster_slide using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
        Special Effect - Destroy (Last created special effect)
        [COLOR="red"][B]Custom script: call RemoveLocation(udg_MoveToPoint)
        Custom script: call RemoveLocation(udg_CasterPosition)[/B][/COLOR]
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (N_Slide Greater than or equal to Distance_Slide) or ((Caster_slide is Dead) Equal to True)
            Then - Actions
                Unit - Unpause Caster_slide
                Unit - Turn collision for Caster_slide On
                Animation - Reset Caster_slide's animation
                [COLOR="Red"][B]Custom script: set udg_Caster = null
                Custom script: call RemoveLocation(udg_MoveToPoint)[/B][/COLOR]
                Trigger - Turn off (This trigger)
            Else - Actions
                Do nothing
the marked one is the proplems -they doesnt work - when i save the game it says that these trigger codes doesnt works
Code:
    call RemoveLocation(udg_MoveToPoint)
Expected a name
Code:
    call RemoveLocation(udg_CasterPosition)
Expected a name
Code:
        set udg_Caster = null
Expected a variable name
Code:
        call RemoveLocation(udg_MoveToPoint)
Expected a name

These are my proplems... hope you can help me:(
 

denmax

You can change this now in User CP.
Reaction score
155
Eerh... You edit the field (call RemoveLocation (udg_<this is the field>) to the name of your variable -.-
 

X-maul

AKA: Demtrod
Reaction score
201
ahhh i figured it out^^ now it works - super good tutorial:)
but how do i make it damage when the caster hits an enemy unit?
plz show me (in GUI):)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top