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 / Need scripting help

Author
Message
Cloud of Crows Studios
19
Years of Service
User Offline
Joined: 22nd Nov 2004
Location:
Posted: 25th Feb 2005 20:28 Edited at: 25th Feb 2005 20:30
My first attempts at creating a custom AI script have ended in frustration.

Here's what I'm trying to do (this should be relatively easy):

I'm trying to create some simply random "fidgets" for the entity.

Something along the lines of

:state=1:animate=1
:state=1,random=100:animate=6
:state=1,random=100:animate=7

In theory this script would have the character standing idle and randomly preforming action 6 (reload) and action 7 (press button). By adjusting the random=100 you could alter the frequency of the random fidgeting.

In practice what happens is the entity will loop an animation several times. In other words the entity will play the reload animation 3, 4 or more times in a row.

I tried every combination I could think of using freeze, animate=1, frameatend, alternate states, etc. and I could NOT get the AI to play an animation sequence only once!?!

Did I hit another bug here relating to the timing given to AI or am I just missing an obvious sequence of FPI commands?

This is a very easy setup to test. Create a room, place a player marker and 1 entity (I was using Aiko w/ blaster pistol for all my tests). Give the entity the custom AI with NO other commands in it (so the entity doesn't wander around, etc.)

IF anyone can get this to work please let me know... and do test what you post because I want to ascertain that this is something I'm doing wrong and not a bug.

I'm not going to post my exact script here because I would rename the test script each time and re-assign it to the entity to make sure it was using a fresh script. I no longer have all the different variations I tried...

Let's put it this way - I got up to a_test30.fpi before I gave up in frustration for the night.
Hatsu
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location:
Posted: 25th Feb 2005 21:20
You could try the animationover command to set it back to one

:state=0:animate=1
:animationover=1,random=5:animate=7,state=1
:animationover=7:state=0

This way you are not constantly asking it to play animation 1. Haven't had a chance to try this out yet. Will have a go later, so it might be fruitless.
Cloud of Crows Studios
19
Years of Service
User Offline
Joined: 22nd Nov 2004
Location:
Posted: 25th Feb 2005 22:03
@Hatsu - that's a good theory. Test it out (or I will tonight) and let me know if that seems to work. I must have missed animationover in the scripting list

I *did* not actually use :state=0:animate=1 in most of my testing as I was concerned that the AI loop was hitting that command too frequently. Much to my surprise I found that entities default to looping the idle animation anyways so it's an unneccesary command.

Interestingly no matter what I did I could not get the freeze command to work. I'm wondering if it either (1) only works when entities are on the move or (2) is bugged.
Hatsu
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location:
Posted: 25th Feb 2005 23:07
The script I wrote works like a charm.
Cloud of Crows Studios
19
Years of Service
User Offline
Joined: 22nd Nov 2004
Location:
Posted: 27th Feb 2005 00:37
Hatsu - That does the trick. Thank you very much, that tip lead to an understanding of related commands so it was very helpful advice indeed.
BULLSHOCK
18
Years of Service
User Offline
Joined: 15th May 2005
Location:
Posted: 7th Jun 2005 10:45
hahahaha! how old is this thread? from like last year!!!
hope cloud of crows studios sees this...

-I will beat anyone in HALO2!
Dory The Cable Guy
18
Years of Service
User Offline
Joined: 23rd Apr 2005
Location:
Posted: 11th Jun 2005 08:54
was fpsc out last year?!!

Heven doesn't want me and Hell's afraid i'll take over!!!
uman
Retired Moderator
19
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 13th Jun 2005 07:32
No FPSC was not - but the FPSC Forum has been active since autumn of last year, around three months before the EA release in January -many of the original forum members are long gone -look at the date of my joining - thats approx the date the Forum started.

Dory The Cable Guy
18
Years of Service
User Offline
Joined: 23rd Apr 2005
Location:
Posted: 18th Jun 2005 10:03
ya, i know, thats crazy

Heven doesn't want me and Hell's afraid i'll take over

Login to post a reply

Server time is: 2024-04-16 23:45:54
Your offset time is: 2024-04-16 23:45:54