• 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.

Move unit instantly, only to get stuck in regular terrain?

Status
Not open for further replies.
Level 4
Joined
Sep 26, 2005
Messages
40
i made a trigger where i cast a spell and it moves my unit to the target area.. much like "blink" would.. but just via trigger because i needed him to be disapeared for a set amount of time. like .5 -1 second. so i have it hide the unit, make him invun.. then have it start a timer.. then when the timer expires. he reappears in the target area. invun is taken away and i Unhide him.

problem is, it sometimes makes him stuck in even regular terrain.. no walls. but it's different in that i can't cast spells. i can't move in either direction. he looks fine, but doesn't act fine. he turns like he is about to run in that direction but still remains in area.. he can attack anything that comes near him. if i click any spells, you hear the click sound like it registers but it never follows up. it's acting as though i clicked a spell and instantly clicked stop to cancel. you know what i mean? yet, the "stop" button is never highlighted as though it has been clicked.. no button is.. no hold position.. no anything.

Also, to make matters worse.. when i tested it online with some people, differen't people would say "hey, my character can't move!.. it can't cast spells".. and i think this occurred when i'd target on them sometimes.

only things i can think of is possibly turning collision off and then back on and pausing him. i'm hoping that does it. but still. that makes no sense. i'd like to know what is causing this.
the ability is "Leap".. i'm jumping from one place to another. often landing on units. it doesn't seem to stuck enemy units tho from what i've noticed.

also, after a while, sometimes my allies would come unstuck for no reason.. if they havn't died from it.. usually about a 2 minutes later, they can move again.
 
Level 4
Joined
Sep 26, 2005
Messages
40
Okay, here is the code. it's based off of me casting a dummy spell of "healing spray" that does 0 damage/heal with a 250 AOE and targetting "None". I only use the 250 aoe for the the look of the aoe target. and i use healing spray because i use the model for the same unit as the healing spray graphic..

then, at the end of the leap i have a dummy unit created that stomps the ground. just had an idea.. Would having stomp and the Environmental effect in the code for the crater cause this? or how about having "none" for targets in healing spray?


as for trying to turn the collision off and pausing the unit (stated above in prev post), i tried it and it seems to do the same thing.
When i test this out offline, i set the cooldown very low so that i can repeatedly cast to see if there is any problems and it seems so damn solid. nothing goes wrong at all! perfect.. yet when i try it Online.. that's where i either random freeze my character or other people's.. either to the point of not being able to get the unit to move or can't cast spells. and if they die they can't revive. then we'll wait like 30 seconds up until 2 minutes tops.. and we regain control. It seems to lock one of us up once every 3-4 leaps.. guaranteed. it's random.

anyhow, here is the code:

Code:
Leap
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Leap (Hulk)
        (Unit-type of (Casting unit)) Equal to Juggernaut (Hulk)
        ((Casting unit) is alive) Equal to True
    Actions
        Set Leap_CasterU = (Casting unit)
        Set Leap_Targ_Posi = (Target point of ability being cast)
        Set Leap_Caster_Posi = (Position of Leap_CasterU)
        Set Leap_AbilityLevel = (Level of (Ability being cast) for Leap_CasterU)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Or - Any (Conditions) are true
                    Conditions
                        (Terrain pathing at Leap_Targ_Posi of type Walkability is off) Equal to True
                        (Leap_Targ_Posi is masked for (Owner of Leap_CasterU)) Equal to True
            Then - Actions
                Unit - Order Leap_CasterU to Stop
                Custom script:   call RemoveLocation( udg_Leap_Caster_Posi )
                Custom script:   call RemoveLocation( udg_Leap_Targ_Posi )
                Countdown Timer - Start Leap_Dist_Timer as a One-shot timer that will expire in 0.00 seconds
                Sound - Play Error <gen> at 75.00% volume, attached to Leap_CasterU
                Game - Display to (All players matching ((Matching player) Equal to (Owner of Leap_CasterU))) for 2.00 seconds the text:                    ...
                Skip remaining actions
            Else - Actions
                Do nothing
        Unit - Make Leap_CasterU Invulnerable
        Special Effect - Create a special effect at Leap_Caster_Posi using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
        Special Effect - Destroy (Last created special effect)
        Set Leap_Distance_Real = ((Distance between Leap_Caster_Posi and Leap_Targ_Posi) / 750.00)
        Custom script:   call RemoveLocation( udg_Leap_Caster_Posi )
        Countdown Timer - Start Leap_Dist_Timer as a One-shot timer that will expire in Leap_Distance_Real seconds
        -------- Protect Invunerability --------
        Countdown Timer - Start Leap_Checker_Timer as a One-shot timer that will expire in 3.00 seconds
        -------- Protect Invunerability End --------
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Remaining time for Leap_Dist_Timer) Greater than 0.38
            Then - Actions
                Wait until ((Elapsed time for Leap_Dist_Timer) Greater than or equal to 0.29), checking every 0.10 seconds
            Else - Actions
                Unit - Make Leap_CasterU Vulnerable
                Unit - Order Leap_CasterU to Stop
                Custom script:   call RemoveLocation( udg_Leap_Caster_Posi )
                Custom script:   call RemoveLocation( udg_Leap_Targ_Posi )
                Countdown Timer - Start Leap_Dist_Timer as a One-shot timer that will expire in 0.00 seconds
                Sound - Play Error <gen> at 75.00% volume, attached to Leap_CasterU
                Game - Display to (All players matching ((Matching player) Equal to (Owner of Leap_CasterU))) for 2.00 seconds the text:                    ...
                Skip remaining actions
        Unit - Hide Leap_CasterU
        Unit - Pause Leap_CasterU
        Unit - Turn collision for Leap_CasterU Off
        Visibility - Create an initially Enabled visibility modifier for (Owner of Leap_CasterU) emitting Visibility from Leap_Caster_Posi to a radius of 512.00
        Set Leap_Visibility[1] = (Last created visibility modifier)
        Visibility - Create an initially Enabled visibility modifier for (Owner of Leap_CasterU) emitting Visibility from Leap_Targ_Posi to a radius of 512.00
        Set Leap_Visibility[2] = (Last created visibility modifier)
        Wait until ((Remaining time for Leap_Dist_Timer) Less than or equal to 0.00), checking every 0.10 seconds
        Special Effect - Create a special effect at Leap_Targ_Posi using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
        Special Effect - Destroy (Last created special effect)
        Unit - Move Leap_CasterU instantly to Leap_Targ_Posi
        Unit - Unhide Leap_CasterU
        Unit - Unpause Leap_CasterU
        Unit - Turn collision for Leap_CasterU On
        Unit - Make Leap_CasterU Vulnerable
        Unit - Create 1 Sub Zero Dummy Caster for (Owner of Leap_CasterU) at Leap_Targ_Posi facing Default building facing degrees
        Set Leap_DummyU = (Last created unit)
        Unit - Add a 2.50 second Generic expiration timer to Leap_DummyU
        Unit - Set level of Leap (Hulk dummy spell damage) for Leap_DummyU to Leap_AbilityLevel
        Unit - Order Leap_DummyU to Orc Tauren Chieftain - War Stomp
        Special Effect - Create a special effect attached to the origin of Leap_CasterU using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Unit Group - Pick every unit in (Units within 250.00 of Leap_Targ_Posi matching (((Matching unit) belongs to an enemy of (Owner of Leap_CasterU)) Equal to True)) and do (Actions)
            Loop - Actions
                Set Leap_Picked_stunnedU = (Picked unit)
                Special Effect - Create a special effect attached to the origin of Leap_Picked_stunnedU using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
                Special Effect - Destroy (Last created special effect)
        Environment - Create a 0.40 second Temporary crater deformation at Leap_Targ_Posi with radius 300.00 and depth 64.00
        Custom script:   call RemoveLocation( udg_Leap_Caster_Posi )
        Custom script:   call RemoveLocation( udg_Leap_Targ_Posi )
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Units currently selected by (Owner of Leap_CasterU)) is empty) Equal to True
            Then - Actions
                Selection - Select Leap_CasterU for (Owner of Leap_CasterU)
            Else - Actions
                Selection - Add Leap_CasterU to selection for (Owner of Leap_CasterU)
        Visibility - Disable Leap_Visibility[1]
        Visibility - Disable Leap_Visibility[2]
        Visibility - Destroy Leap_Visibility[1]
        Visibility - Destroy Leap_Visibility[2]


Edit: I had an idea. what if it's something to do with me Hiding the unit as it is in the middle of channeling a spell?
 
Status
Not open for further replies.
Top