• 🏆 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!

Hello!

Status
Not open for further replies.
Level 4
Joined
Jul 10, 2013
Messages
73
Is this all I need? Does this make the unit inside the transport vulnerable when the transport dies with the unit inside it?

  • load
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
    • Actions
      • Unit - Make (Triggering unit) Invulnerable
  • unload
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Unload (editor)(Q)
    • Actions
      • Unit - Make (Triggering unit) Vulnerable
 
Level 6
Joined
Jun 4, 2017
Messages
172
  • base.gif
    unload
    • joinminus.gif
      events.gif
      Events
      • line.gif
        joinbottom.gif
        unit.gif
        Unit - A unit Finishes casting an ability
    • joinminus.gif
      cond.gif
      Conditions
      • line.gif
        joinbottom.gif
        if.gif
        (Ability being cast) Equal to Unload (editor)(Q)
    • joinbottomminus.gif
      actions.gif
      Actions
      • empty.gif
        joinbottom.gif
        unit.gif
        Unit - Make (Triggering unit) Vulnerable
This will not make the unloaded unit vulnerable because with triggering unit you are referring to the unit who finishes casting the ability I think, so you are referring to the transport. I don't think it's possible to detect if a unit is unloaded with normal events, the only way should be use Bribe's GUI Unit Event.
 
Level 7
Joined
Jan 23, 2011
Messages
350
Start with importing THIS
GUI Unit Event v2.4.0.0
If you look the post

  • Detect when a unit is loaded into a transport
    Event: Game - CargoEvent Becomes Equal to 1.00
    Unit: CargoTransportUnit[UDex] --- The unit who loaded this unit

  • Detect when a unit is unloaded from a transport
    Event: Game - CargoEvent Becomes Equal to 2.00
    Unit: CargoTransportUnit[UDex] --- The unit who unloaded this unit
Then you create two triggers

Event
Game - CargoEvent becomes equal to 1.00
No condition
Unit - Add Invulnerable (Neutral) to UDexUnits[UDex]


Event
Game - CargoEvent becomes equal to 2.00
No condition
Unit - Remove Invulnerable (Neutral) to UDexUnits[UDex]
 
Level 4
Joined
Jul 10, 2013
Messages
73
ah okay! also! I would like to make it so that a vehicle will not work without a hero inside of it (the movement speed will be 0 and it will be unable to attack / use abilities)

here is one set of triggers i tried, but doesnt seem to work

  • transport
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • Car (F) (Human) Equal to (Unit-type of (Transporting unit))
          • Cobra Striker E92 (C)(human) Equal to (Unit-type of (Transporting unit))
    • Actions
      • Unit - Set (Transporting unit) movement speed to 450.00
  • transport unload
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Unload (editor)(Q)
      • Or - Any (Conditions) are true
        • Conditions
          • Car (F) (Human) Equal to (Unit-type of (Transporting unit))
          • Cobra Striker E92 (C)(human) Equal to (Unit-type of (Transporting unit))
    • Actions
      • Unit - Set (Transporting unit) movement speed to 0.00
 
Level 6
Joined
Jun 4, 2017
Messages
172
ah okay! also! I would like to make it so that a vehicle will not work without a hero inside of it (the movement speed will be 0 and it will be unable to attack / use abilities)

here is one set of triggers i tried, but doesnt seem to work

  • transport
    • Events
      • Unit - A unit Is loaded into a transport
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • Car (F) (Human) Equal to (Unit-type of (Transporting unit))
          • Cobra Striker E92 (C)(human) Equal to (Unit-type of (Transporting unit))
    • Actions
      • Unit - Set (Transporting unit) movement speed to 450.00
  • transport unload
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Unload (editor)(Q)
      • Or - Any (Conditions) are true
        • Conditions
          • Car (F) (Human) Equal to (Unit-type of (Transporting unit))
          • Cobra Striker E92 (C)(human) Equal to (Unit-type of (Transporting unit))
    • Actions
      • Unit - Set (Transporting unit) movement speed to 0.00
These triggers will not work for 3 reasons:
1)With "Transporting unit" you are referring to the transport, not the unit who is loaded; you should use "Loading unit" for refering to the unit who entered in the transport.
2)The unload trigger will not work because you can't detect when a unit is unloaded, you have to download Bribe's GUI unit event if you want to detect that.
3)Normal max speed of a unit is 400 and min is 150, so your trigger will not work correctly until you don't change maximum and minimum speed of a unit in gameplay constants.
 
Level 4
Joined
Jul 10, 2013
Messages
73
I tried this setup, but this didn't work either. I wonder if it is because the editor won't let me set the Gameplay constants to 0? It only lets me go to 1.

  • transport
    • Events
      • Game - CargoEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Unit - Set UDexUnits[UDex] movement speed to 450.00
  • transport unload
    • Events
      • Game - CargoEvent becomes Equal to 2.00
    • Conditions
    • Actions
      • Unit - Set UDexUnits[UDex] movement speed to 0.00
 

Attachments

  • gameplay constants.png
    gameplay constants.png
    57.3 KB · Views: 51
Level 6
Joined
Jun 4, 2017
Messages
172
I wonder if it is because the editor won't let me set the Gameplay constants to 0? It only lets me go to 1.
You can force the editor to put some value that normally cannot be inserted by pressing and holding shift, while you are holding shift click enter or double click in the value which you want to change then you can release shift and put every value you want.
 
Last edited:
Status
Not open for further replies.
Top