Heyas,
Here's my first contribution to the script board
This is just a script to help view animations and alt. textures in the game. I honestly didn't search to see if it had been done before. It's already saved me a lot of test-game loading time and maybe can help others as well.
It's only been tested in PBUM but will likely work the same in Project Green as well unless the debug printing was added later. It won't work in vanilla because it uses Ply's variables.
Simply assign the anim_viewer.fpi script to the main AI of any dynamic entity and use PgUp/PgDn to cycle through animations and Home key to toggle textures, if assigned. Script can be useful for artists needing a way to easily check their work and for scripters deciding which animation to choose.
It's capped at 50 anims but there are only 42
selectable anims in the stock FPSC rig anyhow. You can raise/lower the cap in the script if desired. It can be used on any animated entity and not only chars.
If using alttextures, be sure the textures are located in the texturebank and not the entity's directory!
If you have a weapon assigned it will show the appropriate anim based on the anim input number. So, if you have a pistol assigned and you select anim6 it will show the pistol reload, not the throw.
Known semi-buggy things are that if you have an alttexture assigned in the editor or FPE but don't have the alttexture in texturebank, the model will go white and its lighting will get messed up. Also, if you want to view anim0 (spawn, you must go up to anim1 then back down to anim0.
Lastly, if there is no anim assigned for the slot you have selected, they will just be frozen until a valid animation is selected.
Video of script in use:
http://www.youtube.com/watch?v=wOjxvJIExik
Here's the script (also attached to post):
;//Artificial Intelligence Script
;//PBUM/PG test anims (manual cycle) debug/QA script by EAI
;//Assign to any entity/char with animation to easily view animation playback.
;//Adjust varless=anim X conditions to adjut anim number cap.
;//Stock chars only go up to anim42 and will display only the animation subset for the weapon assigned. This is the scriptable animation number and not the FPE animation number!
;//Notes: I don't think the printval action is working and I'm too ignorant to set up a numeric hud :S
;//KNOWN ISSUES: To view anim #0, you must first go up to anim1 then back down to anim0. If using alttextures, the textures MUST be loacted in texturebank.
;//Header
desc = anim viewer
:state=0:dimvar=anim,setvar=anim 0
:state=0:hudreset,hudx=50,hudy=90,hudtext=[PgUp] / [PgDn] = NEXT / PREV. Animation - [HOME] = Toggle Alttexture 0/1,hudname=ANIMprompt,hudhide=1,hudmake=display
;//----------------------------------------------------------------
:state=0:dimvar=atex,setvar=atex 0
;//Alt. texture toggle [HOME] key
:varequal=atex 0,inview=1,plrdistwithin=500,timergreater=200,scancodekeypressed=199:timerstart,alttexture=1,setvar=atex 1,sound=audiobank\misc\talkping.wav
:varequal=atex 1,inview=1,plrdistwithin=500,timergreater=200,scancodekeypressed=199:timerstart,alttexture=0,setvar=atex 0,sound=audiobank\misc\talkping.wav
;//----------------------------------------------------------------
:state=0:timerstart,state=1
;//----------------------------------------------------------------
:state=1:animate=%anim
:state=1,inview=1,plrdistwithin=500:hudshow=ANIMprompt,hudfadeout=ANIMprompt
;//NEXT ANIM
:state=1,varless=anim 49,inview=1,plrdistwithin=500,timergreater=200,scancodekeypressed=201:timerstart,state=2,addvar=anim 1,sound=audiobank\switches\click.wav
;//PREV ANIM
:state=1,vargreater=anim 1,inview=1,plrdistwithin=500,timergreater=200,scancodekeypressed=209:timerstart,state=2,subvar=anim 1,sound=audiobank\switches\click.wav
:state=1,inview=1:setcursor=460 700,printstr=ANIMATION#
;//:state=1,inview=1:setcursor=540 700,printstr=%anim
;//----------------------------------------------------------------
:state=2:animate=%anim
:state=2,inview=1,plrdistwithin=500:hudshow=ANIMprompt,hudfadeout=ANIMprompt
;//NEXT ANIM
:state=2,varless=anim 49,inview=1,plrdistwithin=500,timergreater=200,scancodekeypressed=201:timerstart,state=1,addvar=anim 1,sound=audiobank\switches\click.wav
;//PREV ANIM
:state=2,vargreater=anim 1,inview=1,plrdistwithin=500,timergreater=200,scancodekeypressed=209:timerstart,state=1,subvar=anim 1,sound=audiobank\switches\click.wav
:state=2,inview=1:setcursor=460 700,printstr=ANIMATION#
;//:state=2,inview=1:setcursor=540 700,printstr=%anim
;//----------------------------------------------------------------
:varequal=anim 0,inview=1:setcursor=540 700,printstr=0
:varequal=anim 1,inview=1:setcursor=540 700,printstr=1
:varequal=anim 2,inview=1:setcursor=540 700,printstr=2
:varequal=anim 3,inview=1:setcursor=540 700,printstr=3
:varequal=anim 4,inview=1:setcursor=540 700,printstr=4
:varequal=anim 5,inview=1:setcursor=540 700,printstr=5
:varequal=anim 6,inview=1:setcursor=540 700,printstr=6
:varequal=anim 7,inview=1:setcursor=540 700,printstr=7
:varequal=anim 8,inview=1:setcursor=540 700,printstr=8
:varequal=anim 9,inview=1:setcursor=540 700,printstr=9
:varequal=anim 10,inview=1:setcursor=540 700,printstr=10
:varequal=anim 11,inview=1:setcursor=540 700,printstr=11
:varequal=anim 12,inview=1:setcursor=540 700,printstr=12
:varequal=anim 13,inview=1:setcursor=540 700,printstr=13
:varequal=anim 14,inview=1:setcursor=540 700,printstr=14
:varequal=anim 15,inview=1:setcursor=540 700,printstr=15
:varequal=anim 16,inview=1:setcursor=540 700,printstr=16
:varequal=anim 17,inview=1:setcursor=540 700,printstr=17
:varequal=anim 18,inview=1:setcursor=540 700,printstr=18
:varequal=anim 19,inview=1:setcursor=540 700,printstr=19
:varequal=anim 20,inview=1:setcursor=540 700,printstr=20
:varequal=anim 21,inview=1:setcursor=540 700,printstr=21
:varequal=anim 22,inview=1:setcursor=540 700,printstr=22
:varequal=anim 23,inview=1:setcursor=540 700,printstr=23
:varequal=anim 24,inview=1:setcursor=540 700,printstr=24
:varequal=anim 25,inview=1:setcursor=540 700,printstr=25
:varequal=anim 26,inview=1:setcursor=540 700,printstr=26
:varequal=anim 27,inview=1:setcursor=540 700,printstr=27
:varequal=anim 28,inview=1:setcursor=540 700,printstr=28
:varequal=anim 29,inview=1:setcursor=540 700,printstr=29
:varequal=anim 30,inview=1:setcursor=540 700,printstr=30
:varequal=anim 31,inview=1:setcursor=540 700,printstr=31
:varequal=anim 32,inview=1:setcursor=540 700,printstr=32
:varequal=anim 33,inview=1:setcursor=540 700,printstr=33
:varequal=anim 34,inview=1:setcursor=540 700,printstr=34
:varequal=anim 35,inview=1:setcursor=540 700,printstr=35
:varequal=anim 36,inview=1:setcursor=540 700,printstr=36
:varequal=anim 37,inview=1:setcursor=540 700,printstr=37
:varequal=anim 38,inview=1:setcursor=540 700,printstr=38
:varequal=anim 39,inview=1:setcursor=540 700,printstr=39
:varequal=anim 40,inview=1:setcursor=540 700,printstr=40
:varequal=anim 41,inview=1:setcursor=540 700,printstr=41
:varequal=anim 42,inview=1:setcursor=540 700,printstr=42
:varequal=anim 43,inview=1:setcursor=540 700,printstr=43
:varequal=anim 44,inview=1:setcursor=540 700,printstr=44
:varequal=anim 45,inview=1:setcursor=540 700,printstr=45
:varequal=anim 46,inview=1:setcursor=540 700,printstr=46
:varequal=anim 47,inview=1:setcursor=540 700,printstr=47
:varequal=anim 48,inview=1:setcursor=540 700,printstr=48
:varequal=anim 49,inview=1:setcursor=540 700,printstr=49
:varequal=anim 50,inview=1:setcursor=540 700,printstr=50
;End of Script
I wanted to have a numeric hud to display anim# but I don't know how to do that yet
And here's a screenshot:
Any problems, please let me know.