As alot of you may know, I am into machinima.
I have always wanted to do a movie with FPSC, so I have been playing around with a puppet script idea.
I have not invested much time with this yet, so it is really basic at this point.
The keys I use for controls are not friendly with the test builds, so I built a one room level to run this script.
Just placed a prefab, a start marker, a thug, and then set the thug's ai main to the puppet script.
After I saved the level and built the game, I started modifying the script a little.
Anyway here is the basic script so far....
;Artificial Intelligence Script
;Header
desc = puppet script
;Triggers
:state=0:state=1
:state=1,scancodekeypressed=33:state=3
:state=1,scancodekeypressed=35:state=4
:state=1,scancodekeypressed=20:state=5
:state=1,scancodekeypressed=19:state=6
:state=1,scancodekeypressed=34:state=7
:state=1,scancodekeypressed=49:state=8
:state=1,scancodekeypressed=50:state=9
:state=2,scancodekeypressed=0:animate=1,state=1
:state=3:animate=2,rotateiy=-3
:state=3,scancodekeypressed=0:animate=1,state=1
:state=4:animate=2,rotateiy=3
:state=4,scancodekeypressed=0:animate=1,state=1
:state=5:animate=2,movefore=2,dropmarker
:state=5,scancodekeypressed=33:rotateiy=-3
:state=5,scancodekeypressed=35:rotateiy=3
:state=5,scancodekeypressed=0:animate=1,state=1
:state=6:animate=5,runfore=2
:state=6,scancodekeypressed=33:rotateiy=-3
:state=6,scancodekeypressed=35:rotateiy=3
:state=6,scancodekeypressed=0:animate=1,state=1
:state=7:animate=2,rotatetoplr,nextmarker
:state=7,scancodekeypressed=33:rotateiy=-3
:state=7,scancodekeypressed=35:rotateiy=3
:state=7,scancodekeypressed=0:animate=1,state=1
:state=8:rotatehead=-30
:state=8,scancodekeypressed=0:animate=1,resethead,state=1
:state=9:rotatehead=30
:state=9,scancodekeypressed=0:animate=1,resethead,state=1
;End of Script
Play with it if you want. (In a built game, not in test mode!)
Controls
'R' = run forward
'T' = walk forward
'F' = turn left
'H' = turn right
'G' = retrace steps
'N' = Rotate head left
'M' = Rotate head right
As long as you hold the key it plays the animation.
When you let off the keys, then it returns to the idle animation.
Once you press a key (say 'r') it will perform that animation even if you press and hold another key.
So, they frist key pressed will assign the animation that is played as long as any key is held down.
Releasing all keys stops that animation.
This way you can roll keys and keep going.
Try this.. press 'r' and hold it down, then roll over to 't' (press t while holding r down then let off r)
'Rolling' the keys allows you to keep running while you turn left or right.
So, try walking then rolling keys to turn while you walk.
It works pretty smooth once you get the hang of it.
Anyway, now I want to make a custom set of animations specifically for controlling with a puppet script.
I also want to incorporate the use of variables in this so it would be possible to toggle from character to character in order to control more than one character at a time for each shot.
Any thoughts on this?
Has anyone else attempted a puppet script for machinima?