I have an event where the character dances at the press of a button, I set it to "B", but nothing happens.
The weird thing is that it works when I change it to "down" which has left me confused... Is it perhaps waiting for input from a joystick?
If so how to set it to a keyboard button press?
I also want this to be a "global event" that can be done in any maps, is that what "common events" are for?
Yes common Events are exactly for global events which can happen on multiple maps.
Paralell Events do not update every frame(common events not sure at the moment), that can cause button input sometimes to be ignored. Does the button work sometimes?
You can solve this with putting the code into a loop + a 1 frame wait.
Example Eventcode:
Loop
Your Eventcode
Wait 1Frame (That provides the Game not crashing through endless loop)
(repeat above)
In Test Builds this got proved to help. Maybe its the cause or atleast one possibility.
1) which key did you press? and which keys are mapped to the button :B in your game?
The key B on your keyboard is NOT the button B - in fact by default the key b is mapped to nothing, so nothing can happen if you press that key.
You can check the local keyboard map by pressing F1 while running the game - just remember that the player is the only one who can change the default keyboard map as it is for the local computer.
2) The conditional branch checks for the button press in that exact frame - you'll need a parallel process for continuous checking as it is almost impossible to match that single frame in a manual keypress.
3) yes, common events are for things that are needed on all maps
Ah, thanks! After checking the local keyboard map and changing a value the button worked perfectly.
But like you said, it will only work for this computer, right? So I still have a problem... Is there there script like "Set InputB to "X""?