• 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] What is wrong with?

Status
Not open for further replies.
Greetings everyone! I don't know if I've posted in the right direction , but I urgently need to solve a problem from my map project, HotA. As you can see , I've posted this tutorial http://www.hiveworkshop.com/forums/f283/create-simplest-3rd-person-camera-97021/ and I'm using that camera for my rpg maps from a long time ago...Now I have a rpgpvp map , with 12 players. I've made the triggers but I don't know what is wrong with them :confused: The camera locks on target , but is not 3rd. Hmm...Here is the trigger:

  • Creating the RPG Mode
    • Events
      • Player - Player 1 (Red) types a chat message containing -rpg as An exact match
    • Conditions
    • Actions
      • Trigger - Turn on Needed trigger <gen>
      • Wait 0.01 seconds
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Camera - Lock camera target for (Picked player) to PlayersHero[(Player number of (Picked player))], offset by (0.00, 0.00) using Default rotation
And:

  • Needed trigger
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Camera - Set Player 1 (Red)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 2 (Blue)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 3 (Teal)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 4 (Purple)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 5 (Yellow)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 6 (Orange)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 7 (Green)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 8 (Pink)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 9 (Gray)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 10 (Light Blue)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 11 (Dark Green)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 12 (Brown)'s camera Angle of attack to 345.00 over 0.10 seconds
      • Camera - Set Player 1 (Red)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 2 (Blue)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 3 (Teal)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 4 (Purple)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 5 (Yellow)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 6 (Orange)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 7 (Green)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 8 (Pink)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 9 (Gray)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 10 (Light Blue)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 11 (Dark Green)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 12 (Brown)'s camera Distance to target to 750.00 over 0.10 seconds
      • Camera - Set Player 1 (Red)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 2 (Blue)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 3 (Teal)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 4 (Purple)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 5 (Yellow)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 6 (Orange)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 7 (Green)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 8 (Pink)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 9 (Gray)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 10 (Light Blue)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 11 (Dark Green)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 12 (Brown)'s camera Height Offset to 100.00 over 0.10 seconds
      • Camera - Set Player 1 (Red)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 1 (Red))]) over 0.10 seconds
      • Camera - Set Player 2 (Blue)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 2 (Blue))]) over 0.10 seconds
      • Camera - Set Player 3 (Teal)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 3 (Teal))]) over 0.10 seconds
      • Camera - Set Player 4 (Purple)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 4 (Purple))]) over 0.10 seconds
      • Camera - Set Player 5 (Yellow)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 5 (Yellow))]) over 0.10 seconds
      • Camera - Set Player 6 (Orange)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 6 (Orange))]) over 0.10 seconds
      • Camera - Set Player 7 (Green)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 7 (Green))]) over 0.10 seconds
      • Camera - Set Player 8 (Pink)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 8 (Pink))]) over 0.10 seconds
      • Camera - Set Player 9 (Gray)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 9 (Gray))]) over 0.10 seconds
      • Camera - Set Player 10 (Light Blue)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 10 (Light Blue))]) over 0.10 seconds
      • Camera - Set Player 11 (Dark Green)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 11 (Dark Green))]) over 0.10 seconds
      • Camera - Set Player 12 (Brown)'s camera Rotation to (Facing of PlayersHero[(Player number of Player 12 (Brown))]) over 0.10 seconds
Well , I think the problem comes from [(Player number of Player ( 1 as example ) but i'm not sure and didn't tryed. Does anyone knows the problem?

Thanks.
 
Level 9
Joined
May 27, 2006
Messages
498
First off, you have to use Trigger - Run Needed trigger, instead of just turning it on. This will make it start.

Second thing, learn using loops. Try putting something like:
  • For each (Integer A) from 1 to 12 do (Actions)
    • Loop - Actions:
      • Camera - Set (Player(Player number(Integer A))) [...]
Next, instead of using bad numbers just make a camera using the cameras palette and set it to proper distance, angle etc etc. Then you would combine it with the triggerpiece i posted above:
  • [...]
    • Camera - Set (Player(Player number(Integer A))) angle to (Angle of (Camera1))
    • Camera - Set (Player(Player number(Integer A))) distance to (Distance of (Camera1))
And so on. This will make your trigger much shorter.
 
Status
Not open for further replies.
Top