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

[Trigger] Tell me what's wrong with this

Status
Not open for further replies.
The camera does not lock and the ship is not selected :O
  • SOLD PALA
    • Events
      • Unit - A unit Sells a unit
    • Conditions
      • (Unit-type of (Sold unit)) Equal to Paladin
    • Actions
      • Unit - Move (Sold unit) instantly to ((Center of Alli Spawn <gen>) offset by (Random real number between 0.00 and 100.00) towards 90.00 degrees)
      • Set Paladin = (Sold unit)
      • Set sold_ALLY = (sold_ALLY - 1)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Limit training of (Unit-type of (Sold unit)) to 0 for (Picked player)
  • Camera of players
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Wait 15.00 seconds
      • Unit - Replace Alliance Ship 0029 <gen> with a Alliance Ship using The old unit's life and mana
      • Set alli_ship = (Last replaced unit)
      • Player Group - Pick every player in Team_ALLY and do (Actions)
        • Loop - Actions
          • Selection - Select alli_ship for (Picked player)
      • Player Group - Pick every player in Team_HORDE and do (Actions)
        • Loop - Actions
          • Selection - Select Horde Ship 0030 <gen> for (Picked player)
      • Countdown Timer - Start (Expiring timer) as a Repeating timer that will expire in 0.10 seconds
      • Camera - Lock camera target for (Owner of Paladin) to Paladin, offset by (0.00, 0.00) using Default rotation
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
because you dont set the team_ally and team_horde to any value before you pick them from the group?

since youre new with trigger I will give you many fixes on the trigger here.
1. NEVER use waits. Use the following event instead.
  • Events
    • Time - Elapsed game time is 15.00 seconds
2. the countdown timer will never start. Use this
  • Countdown Timer - Start some_timer as a One-shot timer that will expire in 30.00 seconds
3. You got two location leaks, check here on how to fix it
http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Status
Not open for further replies.
Top