• 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.

Neutral Ship loading Player units?

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Hi!

I made a dock, and there's a ship that arrives at 8am, and sails at 10am. Arrives again at 4pm and leaves at 6pm.

The units buy a ticket, and the ship transports all the units in the area with the ticket.

I want to transport the units from that dock to the next dock, in another island, but in a "real" way (The units appear when the ship arrives, and the units disappear when the ship sails)

I'm thinking over and over about how to do it, but my mind seems full of nothingness :p
 
Level 8
Joined
Jan 8, 2010
Messages
493
you can make a trigger where units with a ticket move towards the ship when the ship arrives, then another trigger where you hide them when they become within range of the ship, or place a region near the ship and hide the units that enters the region with a condition that they have a ticket and the ship is docked. then when the ship comes to dock on another island, move the hidden units to that island's dock and unhide them.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
I created a "inside the ship" theme. Units are moved theme, and removed when the ship reaches the other side :p. Thanks though!
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
this triggers should work
  • setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Arrive_point = (Center of Region 000 <gen>)
      • Set Send_players_to = (Center of Region 001 <gen>)
  • arrive
    • Events
      • Game - The in-game time of day becomes Equal to 8.00
      • Game - The in-game time of day becomes Equal to 16.00
    • Conditions
    • Actions
      • Unit - Create 1 Night Elf Transport Ship for Neutral Passive at Arrive_point facing Default building facing degrees
      • Set Ship = (Last created unit)
  • sail awey
    • Events
      • Game - The in-game time of day becomes Equal to 10.00
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 400.00 of (Position of Ship)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has an item of type Ticket) Equal to True
            • Then - Actions
              • Unit - Move (Picked unit) instantly to Send_players_to
            • Else - Actions
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
Too hard.

The ship isn't magically created, it arrives naturally, stays for two hours, and leaves picking every unit in a region nex to it and moving them to the ship (Ahora region with a ship theme). The Ship is aldo ordered to go to a point (the other city).

The point is in a region. When the ship enters region, the units 'inside the ship' are moved to the arrival point. This is already fixed. Thanks!
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
this may work also but because i found a bug in the trigger i created above

EDIT, this works for one hero unit for each player only if you want to show a cam for it use a loop trigger.

  • setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Arrive_point = (Center of Region 000 <gen>)
      • Set Send_players_to = (Center of Region 001 <gen>)
      • Set Ship_spawn_point = (Center of Region 004 <gen>)
  • arrive
    • Events
      • Game - The in-game time of day becomes Equal to 8.00
      • Game - The in-game time of day becomes Equal to 16.00
    • Conditions
    • Actions
      • Unit - Create 1 Night Elf Transport Ship for Neutral Passive at Ship_spawn_point facing Default building facing degrees
      • Set Ship = (Last created unit)
      • Unit - Order Ship to Move To Arrive_point
  • sail awey
    • Events
      • Game - The in-game time of day becomes Equal to 10.00
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 400.00 of (Position of Ship)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has an item of type Ticket) Equal to True
            • Then - Actions
              • Unit - Hide (Picked unit)
              • Set Going_with_boat_unit[(Player number of (Owner of (Picked unit)))] = (Picked unit)
              • Set user_in_boat[(Player number of (Picked player))] = True
            • Else - Actions
      • Unit - Order Ship to Move To Send_players_to
  • move to
    • Events
      • Unit - A unit enters Region 001 <gen>
    • Conditions
      • (Triggering unit) Equal to Ship
    • Actions
      • For each (Integer A) from 1 to Number_of_players_in_map, do (Actions)
        • Loop - Actions
          • Unit - Move Going_with_boat_unit[(Integer A)] instantly to Send_players_to
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • user_in_boat[(Integer A)] Equal to True
            • Then - Actions
              • Unit - Unhide Going_with_boat_unit[(Integer A)]
              • Set user_in_boat[(Integer A)] = False
            • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top