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 / Is there an idiots guide to scripting

Author
Message
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 29th Nov 2011 07:15 Edited at: 29th Nov 2011 09:49
Hello All,

As the title reads. I have been playing around with FPSC for about a year now and. I understand the very basics of scripting specifically FPI. I can open an FPI script and basically understand what it's telling the engine to do. I am at the point where I would like to write scipts that make my enemys do a little more than just stand there and shoot. I'd like to write my own script where maybe they crouch stand and shoot a few rounds when the player is within x distance then crouch again. The snipet I have included is there for you to see how bad I am at this. Please let me know what I have done wrong or if I am even close to understanding how the script should look. I am not requesting someone to write the script for me just help me understand it better.[/code]
;desc= crouch stand and fire then crouch

:state=0:state=1
:State=1,plrdistfurther=100:animate=31,state=0
:state=1,plrdistwithin=100:animate=13,state=2
:state=2,plrdistwithin=100:animate=13,shootplr,state=3
:state=3:state=0[code]
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 29th Nov 2011 09:47
animationstart is checked too fast to see anything in the snippet up there. fpsc checks a line within a millisecond or more, you wont see anything. look into the darkAI-mainscript to get an idea how to animate and condition in rows. but: AI-scripting is by far the hardest to do. start with more simple things like triggering events, then go on to animated/moving things, and do AI in the final.

check out the users-guide in your docs-folder, its best for the first step. scripts there are totally explained and easy to understand. they show you the basics you can work with.

do you use fpi-editpad? helps to learn the grammar of scripting.
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 29th Nov 2011 10:02
Maho,

I do use edit pad. I noticed I had my animations in the conditions tried fixing it but it's late and I need some shut eye. I also was thinking that I should be able to tweak an existing shoot or strafe script to get the effect I am looking for. My first and only successful script was to get a light to turn on when the player got close to it. Scripting makes sense to me but for some reason I just can't connect the dots enough to write it correctly. Thank you for trying to help.

It reminds me a lot of trying to learn music theory. I had so much trouble with it for years then a friend of mine said something one day while we were playing guitar and it just clicked.
gozzy1999
13
Years of Service
User Offline
Joined: 11th Jun 2011
Location: in the closet
Posted: 11th Dec 2011 20:21
IF there was an idiots guide to scripting i would have 5 copies and read each twice and still wont be able to script

''Make sure your hands are clean before you point the finger''
TheDesertEagle
13
Years of Service
User Offline
Joined: 7th Jul 2011
Location: Canada - Who knows where else???
Posted: 11th Dec 2011 22:32
i dont cleary understand what you want do
you want them to crouch and shoot?

Joey-May god have mercy upon my enemies, because I won't.
Favourite Game-Call Of Duty MW2
angusm3
15
Years of Service
User Offline
Joined: 6th Mar 2009
Location: Right behind you...
Posted: 11th Dec 2011 22:36
ched80 posted a syntax command list on all the commands and I'm pretty sure the community guides have lessons on how to do it

I appear to have burst into flames...

Login to post a reply

Server time is: 2024-11-27 21:59:19
Your offset time is: 2024-11-27 21:59:19