• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Vehicle Needs Driver

Status
Not open for further replies.
Level 15
Joined
Feb 9, 2006
Messages
1,598
In a map I'm making, I want mechanical units not being able to move unless it has loaded a unit. I've tried to come up with a solution, but failed. Does anyone know how I can do this ?

Thanks,

~Operator

EDIT:

I've tried this trigger, which looks ok. But it crash the game for some reason.

  • Test
    • Events
      • Unit - A unit Is issued an order targeting a point
      • Unit - A unit Is issued an order targeting an object
      • Unit - A unit Is issued an order with no target
    • Conditions
      • ((Triggering unit) is Mechanical) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Paladin 0000 <gen> is being transported) Equal to True
        • Then - Actions
          • Do nothing
        • Else - Actions
          • Unit - Order (Triggering unit) to Stop
 
Last edited:
Level 6
Joined
Oct 26, 2007
Messages
211
A plausible solution:

1) Make vehicles transports.

2) a) By triggers, detect when they are boarded. When this happens, set their movement speed to whatever - by means of SetUnitMoveSpeed(), or w/e.

b)By triggers, detect when they are unboarded. When this happens, set their movement speed and turn rate, respectively, to 0 - again by whatever means.

Means: SetUnitMoveSpeed() - set movespeed to a substantial value or 0
SetUnitTurnSpeed() Make the unit's default movespeed 0 or 1 then, in the former of the two triggers, give it some ability that gives it 1000000% movement speed; and, by the latter of the two triggers, remove this.

etc.
 
Level 34
Joined
Jul 4, 2007
Messages
5,552
I recommend you to ask that Dr Pepper guy, who made the City of Drugs map, to give you the car<>driver triggers from the map. I see him time to time, I think.
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
Can't you just use something different?

Create 2 units your vehicle without driver, and one with driver. Just set turn speed and movement speed of without driver to 0.
Now when a unit uses an ability called enter, just remove that unit and replace the no driver vehicle with a driver vehicle. If it's a hero, just take away control and move it instantly to a corner in the map.
 
Level 12
Joined
Aug 22, 2008
Messages
911
It's an infinite loop- Stop is considered an action with no target, so the unit is ordered to stop over and over again.
Change the trigger, you should:
  • Events
    • Time - Every 0.1 second/s of game time
  • Conditions
    • ((Paladin) is being transported) equal to True
  • Actions
    • Unit Group - Pick every unit in Playable map area matching (Matching Unit is a mechanical equal to True) and do (Actions)
      • Unit - Order picked unit to hold position
 
Level 15
Joined
Feb 9, 2006
Messages
1,598
It's an infinite loop- Stop is considered an action with no target, so the unit is ordered to stop over and over again.
Change the trigger, you should:
  • Events
    • Time - Every 0.1 second/s of game time
  • Conditions
    • ((Paladin) is being transported) equal to True
  • Actions
    • Unit Group - Pick every unit in Playable map area matching (Matching Unit is a mechanical equal to True) and do (Actions)
      • Unit - Order picked unit to hold position

That didn't work though
 
Status
Not open for further replies.
Top