There's an easy way to simulate hallucinations, drunkenness etc - simply run a script on the character that makes use of the setPos and setDir commands.
For example -
"Dizzy" - Every second or so the script would get the player's facing (getDir), add a set amount then use setDir to change the player's facing a bit to the left or right.
"Drunk" - Same as Dizzy, but it also randomly changes the player's position (X or Y) by a small amount as well.
"Black Outs" - Fade to black and back again in a semi random fashion, combined with the occasional forced "drop to prone" animation.
"Hungry" - An appropriate sound effect, combined with a occasional forced "drop to crouch" animation.
"Sleepy" - Slowly setViewDistance down to the minimum, combined with a very slow fade to black and final "drop to prone" animation. Have the script continuously check for change of facing, so if the player shakes his mouse quickly he can defer the effect (I actually wrte a script that did this but it's still not ready for prime time . . . ).
"Hallucinating" - Title cut to a gif image which is slightly transparent. Would be fantastic if it was an animated gif ! Not sure if this is even possible but if it is - :wow:
And so on.
One of my (many) projects is a defined injury system by way of scripts. For example - head hits would cause lag and fades to black, gut shots would make the player look down (again, not sure if possible) and leg hits would make the player change facing towards the injured side every time he moved (forcing a mouse pull to the opposite side).
Man, I love this game !
Roni