Nudging the position of the main player [SOLVED]
by Keith G Wood · in Technical Issues · 03/25/2011 (9:36 pm) · 0 replies
I have a situation where I'd like to move the main player slightly from where it stops when the user lets go of the movement keys (I want to centralise on an object where a certain effect will take place). I have the code to calculate the exact position where I want him to end up - so if I could "set position" or "move to" - either of them would do. The actual movement will be quite small so the user would probably not even notice (I just want him in the right place so that the "about to happen nastiness" looks more realistic).
I've searched through the help, but although I can find the appropriate functions for the AI characters, I cant seem to find an equivalent for the main player. Is there a way of doing this?
Edit: found it myself - .player.setFieldValue("position", %position, -1);
I've searched through the help, but although I can find the appropriate functions for the AI characters, I cant seem to find an equivalent for the main player. Is there a way of doing this?
Edit: found it myself - .player.setFieldValue("position", %position, -1);
About the author
The perverse mind behind Bad Taste Software: http://www.badtastesoftware.co.uk