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

[General] Triggers Die When Playing With...Well, ANYONE!

Status
Not open for further replies.
Level 2
Joined
Aug 19, 2009
Messages
14
I really have no idea why this is happening...

all the triggers in my map so far are working when i playtest. All the floating text, cinematic at the start, spawns, chat commands, all work when playtesting.

As soon as a 2nd player comes in, the whole thing dies, and i have no idea why; floating text disappears, cinematic decides to go somewhere else, no boss spawning etc etc.

Anyone got any idea why this is happening? :vw_death:
 
Level 2
Joined
Aug 19, 2009
Messages
14
Heres the map.

PS: All the Hero Spawn copies are named oddly because i was in a rush to do them. So if its confusing, then im sorry.
 

Attachments

  • Heroes of Valour v1.0.w3x
    52.9 KB · Views: 41
Level 20
Joined
Jul 14, 2011
Messages
3,213
Try fixing these too:

  • BossDeath2
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
      • (Player 1 (Red) controller) Equal to User
      • (Player 2 (Blue) controller) Equal to User
    • Actions
      • Unit - Move (Matching unit) instantly to (Center of Region 002 <gen>)
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 002 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 002 <gen>) over 4.00 seconds
Leaks position (Center of Region 002 <gen>). To fix: Declare that position into a variable, use the variable, the remove the variable:
  • BossDeath2
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
      • (Player 1 (Red) controller) Equal to User
      • (Player 2 (Blue) controller) Equal to User
    • Actions
      • Set TPoint = (Center of Region 002 <gen>)
      • Unit - Move (Matching unit) instantly to TPoint
      • Camera - Pan camera for Player 1 (Red) to TPoint over 4.00 seconds
      • Camera - Pan camera for Player 2 (Blue) to TPoint over 4.00 seconds
      • Custom script: call RemoveLocation(udg_TPoint)
Fix these the same way I told you to fix the last:
  • BossSpawn2
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Game - Display to (All players) for 5.00 seconds the text: FIGHT!
      • Unit - Create 1 Blademaster for Player 12 (Brown) at (Center of Region 007 <gen>) facing Default building facing degrees
  • BossSpawn1
    • Events
      • Time - Elapsed game time is 300.00 seconds
    • Conditions
    • Actions
      • Unit Group - Pick every unit in HeroGroup and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Center of Region 007 <gen>)
      • Set HeroGroup = (Units in (Playable map area) matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) controller) Equal to User)))
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 3 (Teal) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 4 (Purple) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 5 (Yellow) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 6 (Orange) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 7 (Green) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 8 (Pink) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 9 (Gray) to (Center of Region 007 <gen>) over 4.00 seconds
      • Camera - Pan camera for Player 10 (Light Blue) to (Center of Region 007 <gen>) over 4.00 seconds
      • Game - Display to (All players) for 5.00 seconds the text: Get Ready... The B...
      • Trigger - Turn on BossSpawn2 <gen>
  • Untitled Trigger 002
    • Events
      • Time - Every 5.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 5 Dark Troll for Neutral Hostile at (Random point in Region 003 <gen>) facing Default building facing degrees
  • HeroSpawn1v1
    • Events
      • Player - Player 1 (Red) types a chat message containing -archergeneral as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off HeroSpawn1v1 Copy Copy <gen>
      • Trigger - Turn off HeroSpawn1 <gen>
      • Trigger - Turn off (This trigger)
      • Unit - Create 1 Archer General for Player 1 (Red) at (Center of Region 002 <gen>) facing Default building facing degrees
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 002 <gen>) over 4.00 seconds
  • HeroSpawn1v1 Copy
    • Events
      • Player - Player 2 (Blue) types a chat message containing -archergeneral as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off HeroSpawn1v1 Copy Copy 2 <gen>
      • Trigger - Turn off HeroSpawn1 Copy <gen>
      • Trigger - Turn off (This trigger)
      • Unit - Create 1 Archer General for Player 2 (Blue) at (Center of Region 002 <gen>) facing Default building facing degrees
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 002 <gen>) over 4.00 seconds
  • HeroSpawn1v1 Copy Copy
    • Events
      • Player - Player 1 (Red) types a chat message containing -magician as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off HeroSpawn1 <gen>
      • Trigger - Turn off HeroSpawn1v1 Copy Copy <gen>
      • Trigger - Turn off HeroSpawn1v1 <gen>
      • Unit - Create 1 Magician for Player 1 (Red) at (Center of Region 002 <gen>) facing Default building facing degrees
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 002 <gen>) over 4.00 seconds
  • HeroSpawn1v1 Copy Copy 2
    • Events
      • Player - Player 2 (Blue) types a chat message containing -archergeneral as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off HeroSpawn1v1 Copy <gen>
      • Trigger - Turn off HeroSpawn1 Copy <gen>
      • Trigger - Turn off (This trigger)
      • Unit - Create 1 Magician for Player 2 (Blue) at (Center of Region 002 <gen>) facing Default building facing degrees
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 002 <gen>) over 4.00 seconds
  • HeroSpawn1
    • Events
      • Player - Player 1 (Red) types a chat message containing -paladin as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off HeroSpawn1v1 Copy Copy <gen>
      • Trigger - Turn off HeroSpawn1v1 <gen>
      • Trigger - Turn off (This trigger)
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 002 <gen>) over 4.00 seconds
      • Unit - Create 1 Paladin for Player 1 (Red) at (Center of Region 002 <gen>) facing Default building facing degrees
  • HeroSpawn1 Copy
    • Events
      • Player - Player 2 (Blue) types a chat message containing -paladin as An exact match
    • Conditions
    • Actions
      • Trigger - Turn off HeroSpawn1v1 Copy Copy 2 <gen>
      • Trigger - Turn off HeroSpawn1v1 Copy <gen>
      • Trigger - Turn off (This trigger)
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 002 <gen>) over 4.00 seconds
      • Unit - Create 1 Paladin for Player 2 (Blue) at (Center of Region 002 <gen>) facing Default building facing degrees


Wrong: Leaks Unit Group (Units Currently Selected...), and Leaks Position (Center of Region 002). You already know how to fix position.
  • StoreTeleport2
    • Events
      • Player - Player 2 (Blue) types a chat message containing -store as An exact match
    • Conditions
    • Actions
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 002 <gen>) over 1.00 seconds
      • Unit - Move (Random unit from (Units currently selected by Player 2 (Blue))) instantly to (Center of Region 002 <gen>)
Whenever you use a Unit_Group action, declare that group into a variable, use the variable, then destroy the group:
  • StoreTeleport2
    • Events
      • Player - Player 2 (Blue) types a chat message containing -store as An exact match
    • Conditions
    • Actions
      • Set TGroup = (Units currently selected by Player 2 (Blue))
      • Set TPoint = (Center of Region 002 <gen>)
      • Camera - Pan camera for Player 2 (Blue) to TPoint over 1.00 seconds
      • Unit - Move (Random unit from TGroup) instantly to TPoint
      • Custom script: call DestroyGroup(udg_TGroup)
      • Custom script: call RemoveLocation(udg_TPoint)
Same than before:
  • StoreTeleport1
    • Events
      • Player - Player 1 (Red) types a chat message containing -store as An exact match
    • Conditions
    • Actions
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 002 <gen>) over 1.00 seconds
      • Unit - Move (Random unit from (Units currently selected by Player 1 (Red))) instantly to (Center of Region 002 <gen>)
  • ArenaSpawn2
    • Events
      • Player - Player 2 (Blue) types a chat message containing -arena as An exact match
    • Conditions
    • Actions
      • Camera - Pan camera for Player 2 (Blue) to (Center of Region 003 <gen>) over 1.00 seconds
      • Unit - Move (Random unit from (Units currently selected by Player 2 (Blue))) instantly to (Center of Region 003 <gen>)
  • ArenaSpawn1
    • Events
      • Player - Player 1 (Red) types a chat message containing -arena as An exact match
    • Conditions
    • Actions
      • Camera - Pan camera for Player 1 (Red) to (Center of Region 003 <gen>) over 1.00 seconds
      • Unit - Move (Random unit from (Units currently selected by Player 1 (Red))) instantly to (Center of Region 003 <gen>)
  • REPICK1
    • Events
      • Player - Player 1 (Red) types a chat message containing -repick as An exact match
    • Conditions
    • Actions
      • Unit - Remove (Random unit from (Units currently selected by Player 1 (Red))) from the game
      • Trigger - Turn on HeroSpawn1v1 <gen>
      • Trigger - Turn on HeroSpawn1 <gen>
      • Trigger - Turn on HeroSpawn1v1 Copy Copy <gen>


In other words: WHENEVER you want to do something like a system... Think of the most generic way to do it. Most of these triggers can be done in two or three simple triggers with a few actions each. It's easier, requires less work, and is way more efficient.

You'll probably have to rmk all the triggers considering what i'm telling you. There are a bunch of reasons and answers to your problem, due to the inneficient triggers (Don't worry, this happens to all of us when we're starting on this, just be strong, learn, and go on).

If you go to Player Properties in the World Editor (WE) you'll set which slots are USERS and which aren't, they'll be constant (unless you wan't to add AI and use computer players in random slots) so, using them as a condition is... useless. A better way is: "User Slot Status = IS PLAYING".

You can use the same TPoint (For Temporary Point) and same TGroup (For Temporary Group) in all the triggers you want at the same time. You don't have to create a variable for each trigger.
 
Status
Not open for further replies.
Top