Hello folk,
Yes, it is possible, it`s not that hard.
First of all, you must now that in programming (scripting) there are various ways of doing the same thing.
Reading your post, i thought on something like this:
Just use the command animate=x where x is the number of the character animation specified in the fpe file (in example):
;sitting animation
anim5 = 90,190
;stand up animation
anim6 = 210,250
;idle animation
anim7 = 260,290
You would have to edit an existing character script to have the npc act as an enemy, to shoot you and such.
I think you would just have to do something like this:
:state=0:state=1
;while player is further than 6 segments the npc plays the ;animation 5 which is the sitting animation
:state=1,plrdistfurther=600:animate=5
;if player is within 2 segments (very close to the npc), will ;play the animation 6 which is the standup animation
;we use setframe and incframe because this command plays the ;animation once, while the command animate=6 would loop this ;animation instead of playing once
:state=1,plrdistwithin=200:setframe=6,incframe=6
;here will check if the animation finished, then go to state=2 ;where it will play in loop the idle position animation
:state=1,frameatend=6:state=2
:state=2:animate=7
save this as a npc-animation.fpi (or any other name, but with a *.fpi extension) and set it as the main script of your npc.
But if you want a good counseiling bro, try to study the Official Community Guide for FPSC.
I began scripting in 5 months ago, and only by studying this guide, and also, a lot of trial and error, and analizing almost all the stock FPSC scripts, i could learn A LOT, and i am doing AMAZING THINGS in FPSC Script, which i am a lot proud of myself
Study bro, study FPI Script. In the begin i could not understand the use of state variables, but after a lot of training, i learned well.
When you master FPI Script, be sure that you will be able to create an AWESOME FPSC Game.
Cheers,
007.
Goldenye 007 N64