• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Ship cargo loading other players units

Status
Not open for further replies.
Level 5
Joined
Mar 27, 2008
Messages
107
Is it possible to make a ship being able to load other players units in it?
changing 'Targets Allowed' in object editor doesn't work.

Thank you
 
Level 8
Joined
Jan 8, 2010
Messages
493
you can try changing the ship's ownership via triggers to have other units load into it. i figured that a unit cannot enter another player's transport, so to load a unit into the ship it must be selected (thus the owner becomes the player selecting it) and the ship is ordered to load the unit.
 
Level 5
Joined
Mar 27, 2008
Messages
107
Ive made some headway and it works now, the only problem is that I want the unit that has been unloaded to move to a certain destination.
Everything here works perfectly except for the last line "Unit - Order TransportUnit2[(Integer A)] to Attack-Move To (Center of SpawnA2 Copy <gen>)" Which doesn't work at all.
I tried replacing it with a 'kill' action with the same variable and that worked.
Any ideas? I'm stumped <.<

  • Batfrakt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Batfrakt
    • Actions
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • Set TransportUnit2[(Integer A)] = (Target unit of ability being cast)
          • Set TransportUnit[(Integer A)] = (Owner of TransportUnit2[(Integer A)])
          • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
          • Unit - Add Load (colke) to (Triggering unit)
          • Unit - Order (Triggering unit) to Load TransportUnit2[(Integer A)]
          • Unit - Remove Load (colke) from (Triggering unit)
  • Batfrakt2
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Unload (colke)
    • Actions
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • Unit - Change ownership of TransportUnit2[(Integer A)] to TransportUnit[(Integer A)] and Change color
          • Unit - Order TransportUnit2[(Integer A)] to Attack-Move To (Center of SpawnA2 Copy <gen>)
 
Level 8
Joined
Dec 9, 2009
Messages
397
My guess is that the unit is still in the transport when that order comes out. try changing the trigger event from the unload ability (For trigger 2), to unit enters the area you want it to be unloaded at.

If your unloading at a specific spot.
 
Status
Not open for further replies.
Top