• 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] Keyboard Event Spawn

Status
Not open for further replies.
Level 4
Joined
Sep 2, 2006
Messages
99
I am having a little trouble, I want to make it so when the player presses an Arrow Key a Hero spawns, ok I got that. But I also want them to be able to press a different Arrow Key to spawn a different Hero, ok got that too, but what I am having trouble with is that my way would take a lot longer than typing this and asking this question to see if there is in fact a quicker way.

Right now this is what I have
NecroSpawn
Events
Player - Player 1 (Red) Presses the Up Arrow key
Conditions
Actions
Unit - Create 1 Necromancer (Balanced) for (Triggering player) at ((Triggering player) start location) facing (Center of (Playable map area))
Unit - Create 3 Raised Dead (All) for (Triggering player) at ((Triggering player) start location) facing (Center of (Playable map area))
Trigger - Turn off (This trigger)

So Basically I want so when the player presses Left/Right Arrows a Different Hero will spawn, and obviously turn off all the other options so you can't exploit the trigger.
If you are reading this and know how to also make the Down Arrow Spawn a one of three heroes as well, that would be
great.

I do know I could duplicate this trigger twice for each Player, but that would be thirty triggers..
 
Last edited:
Level 22
Joined
Jun 24, 2008
Messages
3,050
  • NecroSpawn
    • Events
      • Player - Player 1 (Red) Presses the Up Arrow key
    • Conditions
      • Actions
        • Unit - Create 1 Necromancer (Balanced) for (Triggering player) at ((Triggering player) start location) facing (Center of (Playable map area))
        • Unit - Create 3 Raised Dead (All) for (Triggering player) at ((Triggering player) start location) facing (Center of (Playable map area))
        • Trigger - Turn off (This trigger)
You leak terribly.
 
Level 7
Joined
Oct 8, 2008
Messages
200
If you want it for more player then just do this
  • NecroSpawn
  • Events
  • Player - Player 1 (Red) Presses the Up Arrow key
  • Player - Player 2 (Blue) Presses the Up Arrow key
  • Player - Player 3 (Teal) Presses the Up Arrow key
  • Conditions
  • Actions
  • Unit - Create 1 Necromancer (Balanced) for (Triggering player) at ((Triggering player) start location) facing (Center of (Playable map area))
  • Unit - Create 3 Raised Dead (All) for (Triggering player) at ((Triggering player) start location) facing (Center of (Playable map area))
  • Trigger - Turn off (This trigger)
 
blizzard suxx

hm, if not, blizzard forgot something again

maybe search under players? i will check that immediately



EDIT: Blizzard did forget something :hohum:

so, easiest thing would be to make more than one trigger, in this case 4 damn triggers for each damn player, a lot of copying and pasting, not rly funny

second thing would be, if u have umswe, u can check the event which fired off, but u need the jass code of it....
u could ask somebody for that ^^

another idea i just had is that u can make another event which activates the trigger a maximum of one time for a player, so that he wouldnt be able to use the arrow keys again

anothe idea: THIS SYSTEM IS SHIT!!! nothing against u, but i used this in my first map, and it turned out..............bad

just an advice, use another hero pick system
 
Last edited:
Status
Not open for further replies.
Top