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 / Eye-gazing script

Author
Message
VUMember
16
Years of Service
User Offline
Joined: 20th Aug 2008
Location:
Posted: 21st Aug 2008 14:08
Hi, I tried to build a simple script that makes any NPC turning his/her head and body to the player as soon as the player enters the NPC's line of sight (for the latter reason I did not want to use the command LOOKATPLR).

I started with the following...
:STATE=0,PLRDISTWITHIN=200:ROTATETOTARGET,LOOKATTARGET

But I assume I would also need to set the target (that the ROTATETOTARGET command obviously refers to) to the player. How could that be done? Do I need the SETTARGET command here? I tried to understand that command but did not come far. The description just tells "SETTARGET sets the internal target for the entity, follows 'target' conditions".

But what are "target conditions"?
And how could I use these target conditions to set the target to the player?

Any help appreciated.
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 21st Aug 2008 16:32
go to fpsfree.com and look at xplosys fpi guide, it has a list of conditions and actions. However, you are off to a good start, it took me a long time to understand the colon and what it means, and where to put it. I'll give you a hint, there are versions of those commands that are meant for the plr, and not a target

I love Jenkins forever :p
There is nothing to fear except fear itself... and FPSC bugs.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 21st Aug 2008 17:39
If you use FPI EditPad you will have breakdown of the conditions and actions. It will give you the definitions by just pointing to an action or a condition. It will also help you keep your conditions and actions in the right place. Clicking on help -- although it is not complete as yet -- will give you the lowdown on how to write a script statement.

http://forum.thegamecreators.com/?m=forum_view&t=129738&b=23

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 28th Aug 2008 23:06
He doesn't need software, he needs a script, you have to use the settargetname command and then rotate to the target
Also, you could make them look first, then rotate themselves.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 29th Aug 2008 18:08
Sorry to have offended you Hybrid. I know he needs a script, but the software will help him write his scripts. So, I may be shameless in letting people know about this software; but it is free and it is dedicated to FPSC scripting.

The past has a lot of memories to hold onto; but, today is chock full of new adventures, and, the future shouts out, "The best is yet to come!" -- TerryC

Login to post a reply

Server time is: 2024-11-24 13:28:19
Your offset time is: 2024-11-24 13:28:19