I'm having a ton of trouble with my cars and any help would be appreciated. Here are the triggers I'm using right now:
Right now with those triggers most of what I said works save for killing the units, I don't have a sound way of checking what unit is holding who yet at all.
And no, using Cargo Hold to physically store the units in the car is not an option as far as I make of it, because you can't play units from other teams into your cargo hold.
Also if it helps, it is not possible for a player to be controlling more then one car at a time as you only control one unit, a single hero, at a time in this map, so MUI via Arrays is fine.
Right now I am wishing there was a way to set sort of artificial 'Children to Parent' relationship between the Car and the units, so that if I killed that Car unit, all the Children units would die as well.
-
CarInteract
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Interact
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Target unit of ability being cast)) Equal to Automobile (Pale Red Ford Falcon)
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Target unit of ability being cast)) Equal to Player 12 (Brown)
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Target unit of ability being cast) has an item of type Car Battery) Equal to True
-
((Target unit of ability being cast) has an item of type Tires) Equal to True
-
((Target unit of ability being cast) has an item of type Engine) Equal to True
-
((Target unit of ability being cast) has an item of type Fuel) Equal to True
-
-
Then - Actions
-
Set CarDriverArray[(Player number of (Triggering player))] = (Triggering unit)
-
Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Change color
-
-
Else - Actions
-
-
-
Else - Actions
-
-
Unit - Set the custom value of (Triggering unit) to ((Player number of (Owner of (Target unit of ability being cast))) + 1)
-
Set TempPoint2 = (Position of (Triggering unit))
-
Set InCarArray[(Player number of (Triggering player))] = (Target unit of ability being cast)
-
Unit - Move (Triggering unit) instantly to (Center of InCar <gen>)
-
Unit - Pause (Triggering unit)
-
Selection - Remove (Triggering unit) from selection for (Owner of (Triggering unit))
-
Unit - Create 1 VisionDummy for (Owner of (Triggering unit)) at TempPoint2 facing Default building facing degrees
-
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Night Elf Druid Of The Talon - Faerie Fire InCarArray[(Player number of (Owner of (Triggering unit)))]
-
-
Else - Actions
-
-
-
-
MovePlayerBack
-
Events
-
Unit - A unit Sells a unit
-
-
Conditions
-
(Unit-type of (Sold unit)) Equal to Exit Car
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Sold unit)) Equal to (Owner of InCarArray[(Player number of (Owner of (Sold unit)))])
-
-
Then - Actions
-
Unit - Change ownership of InCarArray[(Player number of (Owner of (Sold unit)))] to Player 12 (Brown) and Change color
-
-
Else - Actions
-
-
Unit - Unpause UnitArray[(Player number of (Owner of (Sold unit)))]
-
Unit - Move UnitArray[(Player number of (Owner of (Sold unit)))] instantly to (Position of InCarArray[(Player number of (Owner of (Sold unit)))])
-
Unit - Remove All buffs from InCarArray[(Player number of (Owner of (Sold unit)))]
-
Unit - Remove (Sold unit) from the game
-
-
-
CarDeathCondition
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Automobile (Pale Red Ford Falcon)
-
-
Actions
-
Set UnitsInPlayableMapArea = (Units in (Playable map area))
-
Unit Group - Pick every unit in UnitsInPlayableMapArea and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Custom value of (Picked unit)) Equal to ((Player number of (Owner of (Triggering unit))) + 1)
-
-
Then - Actions
-
Unit - Kill (Picked unit)
-
-
Else - Actions
-
-
-
-
Custom script: call DestroyGroup(udg_UnitsInPlayableMapArea)
-
-
Right now with those triggers most of what I said works save for killing the units, I don't have a sound way of checking what unit is holding who yet at all.
And no, using Cargo Hold to physically store the units in the car is not an option as far as I make of it, because you can't play units from other teams into your cargo hold.
Also if it helps, it is not possible for a player to be controlling more then one car at a time as you only control one unit, a single hero, at a time in this map, so MUI via Arrays is fine.
Right now I am wishing there was a way to set sort of artificial 'Children to Parent' relationship between the Car and the units, so that if I killed that Car unit, all the Children units would die as well.