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