Am I mental? This just wont work

Baltazhar

Active Member
Reaction score
55
Let me first point out that I have tried like 10 different structures of this spell, having a unit variable to define triggering unit.
In this I pasted, I set the unit to a unit group with only him, and used "random unit in group".

The idea is that he targets a point with his ability (made off Shockwave), and slides to that point, at which he stops and turns normal (collision, invulnerability and unpaused).

Trigger one:
Code:
Shield Charge
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Shield Charge 
    Actions
        Set ShieldChargeGroup = (Units owned by (Owner of (Triggering unit)) of type Veteran Warrior)
        Set ShieldChargeTargetPoint = (Target point of ability being cast)
        Unit - Turn collision for (Triggering unit) Off
        Unit - Make (Triggering unit) Invulnerable
        Unit - Pause (Triggering unit)
        Trigger - Turn on Shield Charge Move <gen>
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)

Second trigger should do the actual moving of the unit, and stop him when he's close enough.

Code:
Shield Charge Move
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        Set ShieldChargeCasterPoint = (Position of (Random unit from ShieldChargeGroup))
        Set Temp_Point = (ShieldChargeCasterPoint offset by 20.00 towards (Angle from ShieldChargeCasterPoint to ShieldChargeTargetPoint) degrees)
        Set ShieldChargeCasterPoint = Temp_Point
        Custom script:   call RemoveLocation (udg_Temp_Point)
        Unit Group - Pick every unit in ShieldChargeGroup and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ShieldChargeCasterPoint
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Distance between ShieldChargeCasterPoint and ShieldChargeTargetPoint) Less than 20.00
            Then - Actions
                Unit - Turn collision for (Random unit from ShieldChargeGroup) On
                Unit - Make (Random unit from ShieldChargeGroup) Vulnerable
                Unit - Unpause (Random unit from ShieldChargeGroup)
                Trigger - Turn off (This trigger)
            Else - Actions

The effect varies with different setups I make, but nothing actually moves him. I have already made a couple of slidespells in this map, this just doesn't wanna work :nuts:
The outcome of this spell is that he casts Shockwave towards the center of the map (nomatter where it's targeted), and gets 0 collision, invulnerability and is paused. Then nothing else happens.

I would greatly appreciate any pointers as where to this is failing, it's driving me nuts! >.<

Thanks in advance.

- Balt
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
I think that it's trying to move to so many units in just a few seconds, so it faults on itself...
 

Baltazhar

Active Member
Reaction score
55
Another trigger I have, which works perfectly fine, moves a 250 range template of creeps at once, with no problems.
This Unit Group only consists of 1 unit, the caster of the ability. So I don't think moving one unit "at once" is an overkill of any sort.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Re-read trigger so dunno...
 

Baltazhar

Active Member
Reaction score
55
Ah okay. Thanks for looking at it at least.
Hope someone else can figure this nut... I hate triggers sometimes :)
 

Baltazhar

Active Member
Reaction score
55
Now I deleted the triggers and all variables used in them.
Then I found this guide to TimeWalk which is basically what I want it to do:
http://www.thehelper.net/forums/showthread.php?t=78488&highlight=timewalk

I copied over the triggers, made the variables and changed the "Set Variables" to fit my variable names.
This should be absolutely failsafe, seeing as it works perfectly in the Tutorial map.
The ability is based on Channel, as in the tutorial map.

First trigger:
Code:
Shield Charge
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Shield Charge (Channel)
    Actions
        Set ShieldChargeUnit = (Triggering unit)
        Set ShieldChargeCasterPoint = (Position of ShieldChargeUnit)
        Set ShieldChargeTargetPoint = (Target point of ability being cast)
        Set ShieldChargeAngle = (Angle from ShieldChargeCasterPoint to ShieldChargeTargetPoint)
        Set ShieldChargeMaxDistance = (Distance between ShieldChargeCasterPoint and ShieldChargeTargetPoint)
        Set ShieldChargeDistanceTraveled = 0.00
        Unit - Turn collision for ShieldChargeUnit Off
        Unit - Pause ShieldChargeUnit
        Custom script:   call RemoveLocation (udg_ShieldChargeCasterPoint)
        Custom script:   call RemoveLocation (udg_ShieldChargeTargetPoint)
        Wait 0.50 seconds
        Trigger - Turn on Shield Charge Move <gen>

Second trigger:
Code:
Shield Charge Move
    Events
        Time - Every 0.01 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ShieldChargeDistanceTraveled Greater than or equal to ShieldChargeMaxDistance
            Then - Actions
                Set ShieldChargeDistanceTraveled = 0.00
                Set ShieldChargeTargetPoint = (Position of ShieldChargeUnit)
                Unit - Turn collision for ShieldChargeUnit On
                Unit - Unpause ShieldChargeUnit
                Custom script:   call RemoveLocation (udg_ShieldChargeTargetPoint)
                Trigger - Turn off (This trigger)
            Else - Actions
                Set ShieldChargeTargetPoint = (Position of ShieldChargeUnit)
                Set ShieldChargeTargetPoint = (ShieldChargeCasterPoint offset by 15.00 towards ShieldChargeAngle degrees)
                Unit - Move ShieldChargeUnit instantly to ShieldChargeTargetPoint
                Set ShieldChargeDistanceTraveled = (ShieldChargeDistanceTraveled + 15.00)
                Custom script:   call RemoveLocation (udg_ShieldChargeCasterPoint)
                Custom script:   call RemoveLocation (udg_ShieldChargeTargetPoint)

When cast, the unit stand still for the 0.5 seconds, then gets moved instantly to the center of the map. I have absolutely NO clue what the heck is going on! Even a tutorial model wont work.
Is this a map corruption that prevents this ability?

Pretty please, someone give me a hint...
 

Baltazhar

Active Member
Reaction score
55
Okay, apparently I was mental.
Had swapped around 2 variables, which made it defect. My friend looked it over and spotted it, he's quite the hero :)

Case is solved!
 
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