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 / How Do I Learn To Script !

Author
Message
alig96
15
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 24th May 2009 15:59
I was really Annoyed Today Cuz i thought of an idea and thought i could do that if i new how to script so typed in to google "how to script in fps creator" and i got nothing!!!!!!

So any one give me a link for a website to lern how to script or somthing!!!!
thanks
-alig

I is Lyke 2 spll
Bugsy
16
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 24th May 2009 16:15
Well, I learned by looking at all the scripts and reading them like this:

FIRST COLON ( : ) means if
SECOND COLON ( : ) means then
COMMA ( , ) means and
MORE THAN ONE CONDITION ON ONE STATE (:state=0,plrdistwithin=yourmom
:state=0,plrdistwithin=toofarlol)
means else
so a script should be read like: IF state=1 AND plrdistwithin=yourmom THEN (because there has to be a then) shootplr (run shoot.fpi) AND state=2 (the new state=2)

basically thats what you need. get to know the functions and you will become a good scripter.

go to fps-free.com for a scripting tutorial by the mighty plystire himself
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 24th May 2009 16:28
Yes, check the tutorials section of fpsfree.com, but especially check the Community Guide by Nickydude for the most information. It's in a sticky on the Chat board.

Brian.

alig96
15
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 24th May 2009 20:13
Thanks Guys! but i think i sorta get it

:state=0,

so atfirst nothing can happen

plrdistwithin=120

if the player is within in this range do this:

:state=4

so the value has change so what ever you told the engine to do if the value is 4 that will happen?

plese correct if i am wrong

thanks
alig

I is Lyke 2 spll
alig96
15
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 24th May 2009 21:33
ok i have encoutered a problem while making a script:
here is my script:



what i am trying to do is make it play the sound when i have delt 95 damage on the enemy any one help?

thanks
alig
note please correct

I is Lyke 2 spll
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th May 2009 23:30
A few problems:

There should only be 1 colon at the start of each line. Do not use semicolons. Place a colon AFTER your list of conditions. Conditions and actions are comma delimited (Means, you seperate them with commas)

Once you get your line syntax correct, there's the issue of using "shotdamage". That condition means that the entity must receive that much damage (or more) in a single shot. That will work for headshots, but remember that there MIGHT be weapons that can kill an entity in one hit without getting a headshot and your script would play the sound for that anyway.



The one and only,


D0MINIK
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 24th May 2009 23:39 Edited at: 24th May 2009 23:40
I'd suggest to take a look at a few standard scripts... you could have easily compared your script to those and found out yourself within seconds

That might as well be helpful in the future with some more complex scriopts

The Community Guide may be a good friend for scripters as well:

http://forum.thegamecreators.com/?m=forum_view&t=131868&b=21
Bugsy
16
Years of Service
User Offline
Joined: 24th Nov 2008
Location: another place in time
Posted: 25th May 2009 01:22
;Artificial Intelligence Script

;Header

desc = Head Shot Kill Sound

;Triggers

::state=0;shotdamage=95;state=1
::state=1;plrsound=audiobank\Killsounds\1\sd.wav

;End of Script

ok heres the problem:

theres 2 colons in fromt of crap: that basically says to the computer: if then. thats difficult to understand because it means if nothing then nothing.

you commented out everything? wtf? your first line says this to the computer:

if__ then state=0 and (dont read this: shotdamage=95 and now state=1)

also, headshots deals 65505 damage to an enemy immediately: so raise shotdamage to at least over 9000

plrsound? i thought it was playsound?

the end
alig96
15
Years of Service
User Offline
Joined: 24th May 2009
Location:
Posted: 25th May 2009 12:42 Edited at: 25th May 2009 13:40
so its a problem with my colons and semi-colons so would it be:



and thanks guys!

I is Lyke 2 spll
SikaSina Games
16
Years of Service
User Offline
Joined: 5th Dec 2007
Location: Reading, UK
Posted: 25th May 2009 17:05
Quote: "FIRST COLON ( : ) means if
SECOND COLON ( : ) means then
COMMA ( , ) means and
MORE THAN ONE CONDITION ON ONE STATE (:state=0,plrdistwithin=yourmom
:state=0,plrdistwithin=toofarlol)
means else
so a script should be read like: IF state=1 AND plrdistwithin=yourmom THEN (because there has to be a then) shootplr (run shoot.fpi) AND state=2 (the new state=2)"


What you're sayoign is, if you have to press a button witbin 1 second, would it be liek this?




Would that work to freeze the player, wait for them to press a key or die in 5 seconds?

-SSG

NO LONGER ABLE TO PLAY ON MY CRAPBOX SINCE I GOT THE RRoD
FPSC-Online Forums
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th May 2009 01:53
@SikaSina:

Yes, that should work. Your "action to win" would be a little trickier, though.


The one and only,


SikaSina Games
16
Years of Service
User Offline
Joined: 5th Dec 2007
Location: Reading, UK
Posted: 26th May 2009 13:57
Lol, it worked but I'm working on the win action and it's coming along pretty well but I need to set a timer to stop the player pressing the key when dead.

-SSG

NO LONGER ABLE TO PLAY ON MY CRAPBOX SINCE I GOT THE RRoD
FPSC-Online Forums
GraPix
User Banned
Posted: 28th May 2009 13:42
you can download X-Plain to fpi 2 english coverter... so, u can convert it to English understand it more easily. Its a bit out dated but works fine. (file attached)

I HAVE NOT MADE THIS SOFTWARE.

GraPix Entertainment

Attachments

Login to view attachments
GraPix
User Banned
Posted: 28th May 2009 13:42 Edited at: 28th May 2009 13:53
FPSC Community guide has also gr8 tutorials

GraPix Entertainment
voltlight
15
Years of Service
User Offline
Joined: 5th May 2009
Location:
Posted: 28th May 2009 19:31
This thread is very useful, thank you for arising this question.

Also, plystire, you're my third favourite bed time hero, even though I don't really know who you are

Login to post a reply

Server time is: 2024-11-25 02:07:41
Your offset time is: 2024-11-25 02:07:41