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 entity script

Author
Message
Tomik18
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 21st Sep 2017 13:10 Edited at: 21st Sep 2017 13:22
hello i edit script posteffects motionsickness like this


but I can not reach it if i take entity activate remote door and entity has been destroyed. only posteffects has been activated but i need also activated remote door and destroy entity
My PC specs: AMD FX 4300 3,80Ghz
8 GB RAM
GIGABYTE R9 280 Ultra Durable VGA 3GB
ncmako
6
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 21st Sep 2017 21:46 Edited at: 21st Sep 2017 21:53
Tomik18 Good start, almost got it. Your missing a colon ":" at state=0 line.
Did you want the "player" be be IN the zone AND press Enter when picking up item?
The player can not "take" a zone, are you attaching this to an item or zone?
How about play distance? That would work if you attach to an item.

See how the colon if after "pldistwithin and plrusingaction" Both have to happen before
player picks up item and activateifused happens.
But you have ONE problem in the code, state=3 & state=4 will cycle non-stop, do you see it? Need to change that.
The code needs to stop at a "state" so it doesn't kill your performance. Try taking state=3 after "motionsickness"
to a dead-end (this goes for any script your making)

So the whole script should look something like this...

Also, shouldn't you have a "hud" pop-up to tell the player they need to press "Enter"
to take item? I feel that's missing
My games never have bugs. They just develop random features..
Lots and lots of random features...
Tomik18
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 21st Sep 2017 21:57 Edited at: 21st Sep 2017 22:00
ncmako thank you it works i still confused how use colon ":" and "," yes i need hud pop-up

EDIT: when I need the script I look into the already done. but sometimes I can not make it work so I write here
My PC specs: AMD FX 4300 3,80Ghz
8 GB RAM
GIGABYTE R9 280 Ultra Durable VGA 3GB
ncmako
6
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 22nd Sep 2017 00:48 Edited at: 22nd Sep 2017 00:50
Tomik18 Glad it's working for you.
Quote: "i still confused how use colon ":""

If you don't have the v5.1 syntax list (the list of commands) get it here...https://forum.thegamecreators.com/thread/180924
Each line of code has only two colons, one at the beginning, and another at the "condition". The condition is a command that "something
has happen" Think of a condition like this... the player is close to the door (plrdistwithin=x) or when the player clicks the "Enter" key (plrusingaction=x)
those are "conditions", something HAS happened. The code "Waits" for that to happen (that's when you put in a colon) When that condition HAS happened
the code can move past the "colon" and do the rest of the line of code until it reached the next "state" number.
Example: :state=0,plrwithinzone=1: See the second colon, the code waits until the player IS in the zone, when player IS IN THE ZONE it moves to rest of code....
Example: :state=0,plrwithinzone=1:activateifused=1,state=1 The rest of the code was to "activate if used" and move to next state number

To add a "pickup" hud look at the stock "pickup.fpi" script and try adding it to your existing script you have so far.
try it, you might surprise yourself and make it work
My games never have bugs. They just develop random features..
Lots and lots of random features...
Flatlander
FPSC Master
11
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 22nd Sep 2017 00:48 Edited at: 22nd Sep 2017 01:10
Again, I suggest FPI EditPad. Here is a link to the thread which might help figure it out which I don't think is so hard; but usually, the developer wouldn't would he? :SMILE:

You cannot download the installer from the thread but as I mentioned before it comes with BIM.

If you install FPI EditPad, click on help and the drop down menu will be displayed. At this time click on "Contents" and a dialog box will appear. See attached image. This will give a tutorial on what is involved in FPI scripting. The second image shows a partial view of the beginning of the overview.

After installing BIM, you can find a zip file containing the FPI EditPad in the tools folder of The Game Creators root directory. See third image that's attached.
THEORY - you know everything but nothing works. PRACTICE - when everything works but don't know why.
For me, theory and practice are combined: nothing works and I don't know why.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2018-08-21 14:43:35
Your offset time is: 2018-08-21 14:43:35