Hi
I have an object moving eNoBlock and I need to disable any key being pressed because it halts the object moving.
Is there a workaround?
cheers
Edit: This seems to do the trick
//Top of Room Script
function on_key_press(eKeyCode k) {
ClaimEvent();
}
AFAIK there's nothing in AGS that would cause a moving object to stop just because you press a key. If it does, it must be because you have some code in some script that tells it to do so. So, probably change that piece of code?
If the object doesn't move continuously, you could place its movement inside of a cutscene (or just switch it to eBlock).
Or you could override keyboard entries in the room with the object:
//room script
function on_key_press(eKeyCode keycode) {
if (oMoving.Moving) ClaimEvent();
}
That should prevent the game from processing any keyboard entries while "oMoving" is moving. Though it is a little odd that key entries are causing that issue.
Hi,
it's more complicated than that. It is controlling a hot air balloon with bags of sand and heated air...There are no movement keys...It's done automatically via gui buttons and slider.
It seems to be working at the moment....
If you using the default sierra template, it comes with keyboard script. Just remove it if you don't want to use it...
That's good to know (nod)