Worm War-like Movement System

Taishaku

New Member
Reaction score
9
Basically, it's a system in which a unit is forced to constantly move forward while still allowing for a player to adjust the course.

Here is what I have:
Code:
Movement
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 8, do (Actions)
            Loop - Actions
                Set HeroStart[(Integer A)] = (Position of Hero[(Integer A)])
                Set HeroFinish[(Integer A)] = (HeroStart[(Integer A)] offset by 600.00 towards (Facing of Hero[(Integer A)]) degrees)
                Unit - Order Hero[(Integer A)] to Move To HeroFinish[(Integer A)]
                Custom script:   call RemoveLocation (udg_HeroFinish[1])
                Custom script:   call RemoveLocation (udg_HeroFinish[2])
                Custom script:   call RemoveLocation (udg_HeroFinish[3])
                Custom script:   call RemoveLocation (udg_HeroFinish[4])
                Custom script:   call RemoveLocation (udg_HeroFinish[5])
                Custom script:   call RemoveLocation (udg_HeroFinish[6])
                Custom script:   call RemoveLocation (udg_HeroFinish[7])
                Custom script:   call RemoveLocation (udg_HeroFinish[8])

Any suggestions as to how to make this less jerky? Sometimes the orders to adjust course are interrupted by the movement. Should I decrease the distance ordered and the time interval? I am a bit worried about lag.

By the way, the unit is small to create the impressive of immense speed. It has a turn rate of 3 and movement speed of 522. As you can see, there are 8 of them, one for each of 8 players. Each has a starting and finishing location. Thus, three arrays.
 

Moridin

Snow Leopard
Reaction score
144
I think to ensure move order's aren't overriden by the trigger's move orders....you have to increase the time, not decrease. I would suggest setting the time interval to around 2 or 3 and setting the offset to a little larger maybe.
 

Leazy

You can change this now in User CP.
Reaction score
50
What about something like this:

Trigger:
  • Never Stop Moving1
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set Point[1] = (Target point of issued order)
      • Set Point[2] = (Point[1] offset by 1000000000.00 towards (Angle from Point[1] to Point[2]) degrees)
      • Unit - Order (Triggering unit) to Move To Point[2]
      • Custom script: call RemoveLocation (udg_Point[1])
      • Custom script: call RemoveLocation (udg_Point[2])


Trigger:
  • Never Stop Moving2
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Set Point[1] = (Position of (Triggering unit))
      • Set Point[2] = (Point[1] offset by 1000000000.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Order (Triggering unit) to Move To Point[2]
      • Custom script: call RemoveLocation (udg_Point[1])
      • Custom script: call RemoveLocation (udg_Point[2])


This method will however not allow the unit to cast any spells since it will be ordered to move any time it does anything. You could walk around this by checking by conditions if the orders are the spells you want them to be able to cast, if they are, wait the ''Art - Animation - Cast Point'' time of the hero casting the spell and then order the unit to move once again.

Edit: I forgot that you need to turn off both triggers in the beginning and turn them on in the end.

Edit2: Bah, it doesn't work anymore, I dunno why, but I hope this can give you a hint, I think that with some more work you can make this system work!
 

Attachments

  • Never Stop Moving.w3x
    16.4 KB · Views: 182

Taishaku

New Member
Reaction score
9
What about something like this:

Trigger:
  • Never Stop Moving1
    • Events
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order targeting a point
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set Point[1] = (Target point of issued order)
      • Set Point[2] = (Point[1] offset by 1000000000.00 towards (Angle from Point[1] to Point[2]) degrees)
      • Unit - Order (Triggering unit) to Move To Point[2]
      • Custom script: call RemoveLocation (udg_Point[1])
      • Custom script: call RemoveLocation (udg_Point[2])


Trigger:
  • Never Stop Moving2
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
    • Actions
      • Set Point[1] = (Position of (Triggering unit))
      • Set Point[2] = (Point[1] offset by 1000000000.00 towards (Facing of (Triggering unit)) degrees)
      • Unit - Order (Triggering unit) to Move To Point[2]
      • Custom script: call RemoveLocation (udg_Point[1])
      • Custom script: call RemoveLocation (udg_Point[2])


This method will however not allow the unit to cast any spells since it will be ordered to move any time it does anything. You could walk around this by checking by conditions if the orders are the spells you want them to be able to cast, if they are, wait the ''Art - Animation - Cast Point'' time of the hero casting the spell and then order the unit to move once again.

Edit: I forgot that you need to turn off both triggers in the beginning and turn them on in the end.

Edit2: Bah, it doesn't work anymore, I dunno why, but I hope this can give you a hint, I think that with some more work you can make this system work!

Yeah, I considered that, but I want to cast spells. By the way, any suggestions for a spell that does not cause any interruption in movement? I was thinking Windwalk.

EDIT: I just realized that I can apply a Condition to the no-target order to make it only apply for Stop and Hold.

EDIT: Nevermind, it causes a crash.
 

Taishaku

New Member
Reaction score
9
Does anyone else want to try and make a system that ensures that I never stop moving, yet allows me to cast a non-interrupting spell like Windwalk?
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
Does anyone else want to try and make a system that ensures that I never stop moving, yet allows me to cast a non-interrupting spell like Windwalk?

have you tried looking at the map that blizzard made? They have a map called "worm wars" which is the exact concept that your trying to make you should look at their source ;)
 

Taishaku

New Member
Reaction score
9
have you tried looking at the map that blizzard made? They have a map called "worm wars" which is the exact concept that your trying to make you should look at their source ;)

Yes, I noted it in the thread title. Anyhow, the trigger is in some JASS that I don't have a firm understanding of. Besides, I don't have my list of JASS functions handy on this computer. T_T
 

Taishaku

New Member
Reaction score
9
Ba-bump!

Anyone? I currently got a trigger that orders people to move forward every 1.5 seconds. Events using orders and whatnot keep crashing. T_T
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top