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 / Help with animation scripts please!

Author
Message
5dollar Love You Loooong Time
17
Years of Service
User Offline
Joined: 14th Oct 2007
Location:
Posted: 27th Oct 2007 10:58
Hey there!!
And thank you verry much for looking!
Lets say I have an animation, which in the ".x" file at the bottom, show the key frames are: 0,100 and 200.. how do I, in detail, (including the scripts and changing the fpe) make this animation have 2 seprate animations (one from 0-100 the other from 101-200) and make them both go off, at heir own time, depending on when one of the two switches I placed gets used.. (1 switch for each animation)
Thabks alot!
5dollar love you loooong time!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 27th Oct 2007 20:49
In the entities fpe file you'll see at the very bottom, some numbers dealing with animations... will look kinda like this:



That sets up the animation number and which frames of animation will be played for that animation number.

So if the model for your entity has 1 animation from 0 to 100 and another from 101 to 200 then your fpe file would look something like this:



Then your switches will need to "activate" your animating entity with a number suitable to what's going to be animating... example:



Notice in that code, the switch uses "activateifused=2"... so when you give the switch the name of the animating entity in it's "IfUsed" property, then it will activate your animating entity with a value of 2. You can make another switch that uses a value of 3.

Now in your animating entity script:



So this entity will not be animating until the player pushes one of the switches and THEN it will be animating with the corresponding animation.


I hope I was thorough enough for you and that you can get that work.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!

FPSC Scripting Tutorials - http://forum.thegamecreators.com/?m=forum_view&t=116527&b=23
5dollar Love You Loooong Time
17
Years of Service
User Offline
Joined: 14th Oct 2007
Location:
Posted: 28th Oct 2007 14:29
Plystire!! Thank you, again!!! Haha! You deserve a huge mug!! 5$ still love you very looooong time!!
5dollar Love You Loooong Time
17
Years of Service
User Offline
Joined: 14th Oct 2007
Location:
Posted: 4th Nov 2007 19:09
Hey, I tried around a little, and triet to write a simmilar script..
But this script only uses 1 of the 2 animations, no matter which of the 2 switches I pull..
Heres the script:
Quote: "
;Artificial Intelligence Script

;Header

desc = 1 Object, 2 switches, 2 animations..

;Triggers

:state=0,activated=1:state=1,animate=0,sound=$0
:state=0,activated=2:state=4,animate=1,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,activated=0:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0
:state=4:incframe=0
:state=4,frameatend=0:state=5,coloff
:state=5,activated=0:state=6,sound=$1,colon
:state=6:decframe=0
:state=6,frameatstart=0:state=0,setframe=0

;End of Script
"

Can you see my error?
5dollar Love You Loooong Time
17
Years of Service
User Offline
Joined: 14th Oct 2007
Location:
Posted: 6th Nov 2007 11:36
Ahhh.... please help if you can!!

Login to post a reply

Server time is: 2024-11-24 01:34:58
Your offset time is: 2024-11-24 01:34:58