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

[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,183
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