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

Status
Not open for further replies.
The camera does not pan to the position of the unit, Gurathar does not attack the entering unit, and the sound does not play but the text works:

  • Gurathar Intro
    • Events
      • Destructible - City Entrance 0029 <gen> dies
    • Conditions
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: |c0020C000Gurathar:...
      • Sound - Play GruntWarcry1 <gen> at 100.00% volume, attached to Gurathar 0081 <gen>
      • Player Group - Pick every player in Main_PlayerGroup and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Picked player) to (Position of Gurathar 0081 <gen>) over 1.00 seconds
      • Unit - Order Gurathar 0081 <gen> to Attack (Entering unit)
      • Custom script: call DestroyForce(udg_Main_PlayerGroup)
      • Trigger - Turn off (This trigger)
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

=== About the attacking ===

Sure the unit attacks nothing, because your target is "(Entering unit)", but there is no event, where a unit enter something, so you have to change the target.

=== About the sound thing ===

Those attached sounds can only be played, if you flag "3DSound" in the sound editor. Also I don't know but maybe you need to activate "3D sound" in the game

=== Amount the camera ===

Hmm, so first of all (Position of WhoEver) is a leak. You have to make a point variable and set it to the position of the unit and make the camera pan to this point. At the end of the trigger you have to clear the temp point
  • Custom script: call RemoveLocation(udg_name)
Also make sure, that they are players in the player group, else I can't think, why this camera shouldn't work.
 
Moin moin =)

=== About the attacking ===

Sure the unit attacks nothing, because your target is "(Entering unit)", but there is no event, where a unit enter something, so you have to change the target.

=== About the sound thing ===

Those attached sounds can only be played, if you flag "3DSound" in the sound editor. Also I don't know but maybe you need to activate "3D sound" in the game

=== Amount the camera ===

Hmm, so first of all (Position of WhoEver) is a leak. You have to make a point variable and set it to the position of the unit and make the camera pan to this point. At the end of the trigger you have to clear the temp point
  • Custom script: call RemoveLocation(udg_name)
Also make sure, that they are players in the player group, else I can't think, why this camera shouldn't work.
It still doesn't work:

this is how i add the players to the group:

  • Map Initilization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Add Player 1 (Red) to Main_PlayerGroup
      • Player Group - Add Player 2 (Blue) to Main_PlayerGroup
      • Player Group - Add Player 3 (Teal) to Main_PlayerGroup
      • Player Group - Add Player 4 (Purple) to Main_PlayerGroup
      • -------- Allies --------
      • Player - Make Player 1 (Red) treat Player 2 (Blue) as an Ally with shared vision
      • Player - Make Player 1 (Red) treat Player 3 (Teal) as an Ally with shared vision
      • Player - Make Player 1 (Red) treat Player 4 (Purple) as an Ally with shared vision
      • -------- Allies --------
      • Player - Make Player 2 (Blue) treat Player 1 (Red) as an Ally with shared vision
      • Player - Make Player 2 (Blue) treat Player 3 (Teal) as an Ally with shared vision
      • Player - Make Player 2 (Blue) treat Player 4 (Purple) as an Ally with shared vision
      • -------- Allies --------
      • Player - Make Player 3 (Teal) treat Player 1 (Red) as an Ally with shared vision
      • Player - Make Player 3 (Teal) treat Player 2 (Blue) as an Ally with shared vision
      • Player - Make Player 3 (Teal) treat Player 4 (Purple) as an Ally with shared vision
      • -------- Allies --------
      • Player - Make Player 4 (Purple) treat Player 1 (Red) as an Ally with shared vision
      • Player - Make Player 4 (Purple) treat Player 2 (Blue) as an Ally with shared vision
      • Player - Make Player 4 (Purple) treat Player 3 (Teal) as an Ally with shared vision
      • -------- Allies --------
      • Player - Make Player 5 (Yellow) treat Player 1 (Red) as an Ally
      • Player - Make Player 5 (Yellow) treat Player 2 (Blue) as an Ally
      • Player - Make Player 5 (Yellow) treat Player 3 (Teal) as an Ally
      • Player - Make Player 5 (Yellow) treat Player 4 (Purple) as an Ally
      • -------- Enemy --------
      • Player - Make Player 1 (Red) treat Player 6 (Orange) as an Enemy
      • Player - Make Player 2 (Blue) treat Player 6 (Orange) as an Enemy
      • Player - Make Player 3 (Teal) treat Player 6 (Orange) as an Enemy
      • Player - Make Player 4 (Purple) treat Player 6 (Orange) as an Enemy
      • Player - Make Player 5 (Yellow) treat Player 6 (Orange) as an Enemy
      • -------- Enemy --------
      • Player - Make Player 6 (Orange) treat Player 1 (Red) as an Enemy
      • Player - Make Player 6 (Orange) treat Player 2 (Blue) as an Enemy
      • Player - Make Player 6 (Orange) treat Player 3 (Teal) as an Enemy
      • Player - Make Player 6 (Orange) treat Player 4 (Purple) as an Enemy
      • Player - Make Player 6 (Orange) treat Player 5 (Yellow) as an Enemy
      • -------- Hide in Post Game --------
      • Player - Hide Player 5 (Yellow) in the post-game score screen
      • Player - Hide Player 6 (Orange) in the post-game score screen
      • -------- Bounty --------
      • Player - Turn Gives bounty On for Player 6 (Orange)
      • Player - Turn Gives bounty On for Neutral Hostile
      • -------- Gold Set --------
      • Player - Set Player 1 (Red) Current gold to 500
      • Player - Set Player 2 (Blue) Current gold to 500
      • Player - Set Player 3 (Teal) Current gold to 500
      • Player - Set Player 4 (Purple) Current gold to 500
      • -------- Food cap --------
      • Player - Set Player 1 (Red) Food cap to 5
      • Player - Set Player 2 (Blue) Food cap to 5
      • Player - Set Player 3 (Teal) Food cap to 5
      • Player - Set Player 4 (Purple) Food cap to 5
      • -------- Doors --------
      • Destructible - Make Dungeon Gate (Horizontal) 0077 <gen> Invulnerable
      • Destructible - Make Dungeon Gate (Horizontal) 0080 <gen> Invulnerable
      • -------- Camera --------
      • Camera - Change camera smoothing factor to 6.00
      • Player Group - Pick every player in Main_PlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Limit training of Heroes to 1 for (Picked player)
          • Camera - Lock camera target for (Picked player) to Agility Tavern 0001 <gen>, offset by (0.00, 0.00) using Default rotation
      • -------- In Game --------
      • Game - Set the time of day to 18.00
      • Game - Set game speed to Fastest
      • Game - Lock the game speed
      • Environment - Change water tinting color to (100.00%, 100.00%, 100.00%) with 35.00% transparency
      • Custom script: call DestroyForce (udg_Main_PlayerGroup)
i changed the trigger:

  • Gurathar Intro
    • Events
      • Unit - A unit enters Dont let them escape <gen>
    • Conditions
    • Actions
      • Set GuratharLoc = (Position of Gurathar 0081 <gen>)
      • Game - Display to (All players) for 5.00 seconds the text: |c0020C000Gurathar:...
      • Sound - Play GruntWarcry1 <gen>
      • Player Group - Pick every player in Main_PlayerGroup and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Picked player) to GuratharLoc over 1.00 seconds
      • Unit - Order Gurathar 0081 <gen> to Attack (Entering unit)
      • Custom script: call DestroyForce(udg_Main_PlayerGroup)
      • Custom script: call RemoveLocation(udg_GuratharLoc)
      • Trigger - Turn off (This trigger)
 
Level 16
Joined
May 1, 2008
Messages
1,605
So first of all here is a tip how remove this high amount of triggers in the init trigger (loops for the win)
  • T1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Player - Set (Player((Integer A))) Current gold to 500
          • Player - Set (Player((Integer A))) Food cap to 5
          • Player Group - Add (Player((Integer A))) to Main_PlayerGroup
          • Player - Make Player 5 (Yellow) treat (Player((Integer A))) as an Ally
          • For each (Integer B) from 1 to 4, do (Actions)
            • Loop - Actions
              • Player - Make (Player((Integer A))) treat (Player((Integer B))) as an Ally with shared vision
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Player - Make (Player((Integer A))) treat Player 6 (Orange) as an Enemy
          • Player - Make Player 6 (Orange) treat (Player((Integer A))) as an Enemy
In your new created trigger, what exactly doesn't work? Because if the region is correct, at all the temppoint, massage and the sound (if you didn't turn of sounds) must work =O
But possible there is something more I don't know, since I left GUI long time ago behind me for jass^^
 
Status
Not open for further replies.
Top