• 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] Player Variable in relation to Keyboard Events

Status
Not open for further replies.
Level 2
Joined
Oct 29, 2010
Messages
6
Hi there! Basically im making a map where you drive around a circle whilst people try to kill you. My original concept was kind of crap. So im in the process of overhauling the triggers. Making it so that anyone can be the driver and not just a certain player spot. After the selection process has taken place I set the DriverPlayer variable to the person who was randomly selected. Now for my left and right turn triggers I want them to go:

  • TurnLeftPress
    • Events
      • Player - DriverPlayer Presses the Left Arrow key
    • Conditions
    • Actions
      • Trigger - Turn on TurnLeft
Anyway, the trigger works when its specifically about a player slot, eg. Player 1 (Red). But I want it to work when the selected player pushes it which in this case is DriverPlayer. However the Keyboard Event trigger wont seem to let me use a player variable as the player for the event.

If you need me to elaborate on anything here please ask. Just want to get this problem sorted.

Cheers, Krustigutz.
 
Make another trigger:
  • MPI Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- An event for every player, from 1 -12 --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to TurnLeftPress <gen> the event (Player - (Player((Integer A))) Presses the Left Arrow key)[/TROGGMPI Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- An event for every player, from 1 -12 --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to TurnLeftPress <gen> the event (Player - (Player((Integer A))) Presses the Left Arrow key)
  • MPI Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- An event for every player, from 1 -12 --------
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Trigger - Add to TurnLeftPress <gen> the event (Player - (Player((Integer A))) Presses the Left Arrow key)
and edit your current one:
  • TurnLeftPress
    • Events
    • Conditions
      • (Triggering player) Equal to DriverPlayer
    • Actions
      • -------- Actions etc. --------
 
Status
Not open for further replies.
Top