Waiting for a specific set of keys

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
splendidland
Red Slime
Posts: 42
Joined: Tue Feb 19, 2013 11:06 am
Contact:

Waiting for a specific set of keys

Post by splendidland »

Hello, I'm currently making a cutscene in my game where, after the cutscene has played out, it should wait for the player to press either up, left, or right, but won't progress if any other key is pressed. How can I use "wait for key" to wait for a set of specific keys?
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7658
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

"wait for key" can't do what you want, but here is an example script that does:

Code: Select all

plotscript, special wait for keys, begin
  while(true) do(
    wait(1)
    if(key is pressed(key:up) || key is pressed(key:left) || key is pressed(key:up)) then(
      break
    )
  )
end
Post Reply