Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / odd script behaviour

Author
Message
Stevie
User Banned
Posted: 9th Dec 2008 14:12 Edited at: 9th Dec 2008 14:16
I have a really odd problem, as explained below - can anyone help please. This is my sript

;header

desc = characters

;Triggers

:state=0:state=0,animate=1
:state=0,plrdistwithin=450:state=1
:state=0,plrdistfurther=451:animate=1

:state=1,plrdistwithin=451:rotatetoplr,animate=3,movefore=15,state=1

:state=1,plrdistwithin=60:animate=10,state=2


;attack
:state=2,plrdistwithin=60,framebeyond=10 7:plraddhealth=-5
:state=2:incframe=10,rotatetoplr
:state=2,frameatend=10:state=0,
:state=2,plrdistfurther=70:animate=1,state=0


:state=5:incframe=10
:state=5,frameatend=10:state=0
:state=5,plrdistfurther=70:animate=1,state=0
:state=0:state=0,animate=1

Examining the problem, the following always happens and is the main bug

1 PLayer in idle stance

2 - PLayer attacks enemy, moves away from enemy - enemy goes back into idle, script working fine

3 - player goes into attack enemy and succeeds - enemy falls to the floor, but then gets up.



Now heres the wierd thing - if the player then moves away from the character, the enemy's animation seems to freeze. When the player moves back a little, after this first attack, when the enemy stands again, he repeats his attack animation, then freezes.

If the player moves away, then the animations then play again, and starts according to the distance away from the player - so he goes into idle, or walk to player.



What could be causing the sticking?



Thanks



#Steve
Stevie
User Banned
Posted: 9th Dec 2008 15:45
After further investigation, i changed the fight animation to any other animation, just to see if this replaced animation would trigger when the player dies then gets up - and it did. I changed the animation to walk, and when the enemy got up the first time from dying, the walk animation played -

What is causing whatever aninmtion i have assigned for fight to replay itself upon the character re spawning after being knocked down?

Thanks

Steve
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Dec 2008 21:28
When manually incrementing frames for an animation, you need to remember to "setframe" before doing "incframe". See if that fixes your problem.


The one and only,


Login to post a reply

Server time is: 2024-11-24 16:58:04
Your offset time is: 2024-11-24 16:58:04