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 / my first script didn't work...

Author
Message
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 12th Apr 2009 17:22 Edited at: 12th Apr 2009 17:25
I was trying to create a self destruct script (it is really simple) and it doesn't work. here it is:

;self-destruct by andrew

;will self-destruct the character

:state=0:animate=0

:state=0,state=1

:state=1:plrcannotbeseen,animate=1,plrcanbeseen,animate=11,state=2

:state=2,destroy


help please!

p.s.
I am sorry that it is not in a code snippet i do not know how to use it.

dodulee du du!
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 12th Apr 2009 18:12 Edited at: 20th Apr 2009 05:21
First off, You got your conditions and actions mixed up and missing colons.
Second, you need it to be in FPI format (I think... not sure).

:state=0,state=1
should read
:state=0:state=1

:state=1:plrcannotbeseen,animate=1,plrcanbeseen,animate=11,state=2
This mess needs to be divided up the conditions need to be on the otherside of the colon... like this.
:state=1,plrcannotbeseen:animate=1
:state=1,plrcannotbeseen:animate=11,state=2


:state=2,destroy
This should read
:state=2:destory

In the end it should look like this


Use FPI Editpad and it will provide a list of all the conditions and actions. It will also prevent mistakes like this.


The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 12th Apr 2009 18:24
thanks gamer x.

dodulee du du!
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 12th Apr 2009 19:21
dude, you really need to title your threads properly. not to bash you, but how is someone else who has the same problem supposed to get help by searching if your threads aren't named properly?
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 12th Apr 2009 21:55
True, also, try condensing your scripts more like such:


translates to

This makes your script a little more organized, and it's more readable.

Also, heres a tip
To remember where colons go, think of it like this.

You want 1 colon to signal the start of conditions (in otherwords, it's the first thing in every line).

You also want one colon to signal the start of actions.

Use commas to seperate conditions from conditions and actiona from actions


:condition1,condition2:action1,action2

Good first start

"I can't imagine what this place would have been like if I hadn't found you here." - BJ Hunnicutt
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 14th Apr 2009 03:42 Edited at: 14th Apr 2009 03:43
@meteorite


i leave it separated so you can see it clearly.

dodulee du du!
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 14th Apr 2009 14:50 Edited at: 14th Apr 2009 14:52
Quote: "i leave it separated so you can see it clearly."


If you leave them separated, you are actually creating 2 problems:

1. We don't know that you've left them separated intentionally, so your code looks wrong to us. And we are correcting you based on incorrect code; and

2. Your script is wrong when coded that way, which will cause it to fail when you try to implement it.

And to your point about us being able to read it more clearly that way....no, it isn't. Those of us out here who are scripters prefer to have the code compacted and streamlined. It is actually easier for us to read it when it isn't separated into single statements on every line.
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 15th Apr 2009 03:56
oh ...thanks.

dodulee du du!
The challenge master
15
Years of Service
User Offline
Joined: 4th Apr 2009
Location: 645378463586th dimension
Posted: 20th Apr 2009 03:46 Edited at: 20th Apr 2009 03:46
post something people!(the challenge master fumes).

dodulee du du!
Leon Kennedy
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location: Neither here nor there
Posted: 20th Apr 2009 13:51
what do you want us to post? are you still having problems?

Priest of the Church of Joe Wood

Login to post a reply

Server time is: 2024-11-24 23:25:13
Your offset time is: 2024-11-24 23:25:13