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 basic character script

Author
Message
Ocho Geek
17
Years of Service
User Offline
Joined: 16th Aug 2007
Location: Manchester, UK
Posted: 30th Mar 2008 23:52
Im kinda getting around the fpi language, and can do a few basic things, however i need some help with something a little more advanced.
i want to use the follow waypoint script, but how do correctly:

get the character to start moving when plrdistwithin=120
(if possible) to only make him go once and not return

Hopefully i could learn a bit more from this ,
Ocho

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 31st Mar 2008 08:15
Since you are willing to learn, I'll help you out.


To do what you want, you've already stated the condition that you will use: "plrdistwithin=120"

I am guessing that you are just not sure where to use it, right?

Well, here's a snippet of how to make the waypoints work (from my tutorial on AI).



Now, you can see in the code that the first line is the one that causes the entity to start his course on the waypoints. (Makes him start moving) This is the line you want to put the condition in, so that the entity will ONLY start moving along the waypoints when the player approaches.

Here's the same snippet, with your condition put in:




That should do it.


The one and only,
~PlystirE~

Ocho Geek
17
Years of Service
User Offline
Joined: 16th Aug 2007
Location: Manchester, UK
Posted: 1st Apr 2008 18:20
right... so i put it before waypointstart

what do i do to stop it once its gone one way?

Ocho Geek
17
Years of Service
User Offline
Joined: 16th Aug 2007
Location: Manchester, UK
Posted: 3rd Apr 2008 20:35
hate to annoy you like this but i could really have some help...

do i just remove the last line?

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Apr 2008 00:52
Well, I suggest reading my AI scripting tutorial found around here. It covers everything waypoint related and much more. You'll learn a lot from it.


The one and only,
~PlystirE~

Ocho Geek
17
Years of Service
User Offline
Joined: 16th Aug 2007
Location: Manchester, UK
Posted: 5th Apr 2008 17:13
right thanks

Login to post a reply

Server time is: 2024-11-24 07:22:08
Your offset time is: 2024-11-24 07:22:08