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 / Whats wrong?

Author
Message
brummel
14
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 23rd Jan 2006 17:57 Edited at: 23rd Jan 2006 18:41
What is wrong with this script? The npc just starts walking forward without stopping and eventhough the player isnt within 50.Can anyone fix it?



RAAAAH! I have finally ordered FPSC and Model pack 1!
Visual Dave
14
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 23rd Jan 2006 19:15
I haven't tested it but I think I see an immediate problem:

:state=0,plrwithin=50:rotatetoplr,rotatey=90,state=1
^
This should be a colon.

I'm not a script master but check it out and let me know.

"The Honor is to Serve" - Lt. Worf
BULLSHOCK 2
Retired Moderator
15
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 23rd Jan 2006 20:46
;Artificial intelligence script

;Header

desc = civilian

;Triggers

:state=0,plrdistwithin=50,rotatetoplr,rotatey=90,state=1
:state=1,movefore=70,animate=2,state=0

;End of Script

brummel
14
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 23rd Jan 2006 20:58 Edited at: 23rd Jan 2006 21:04
Aww, how stupid of me! Haha, thanks!

EDIT: It still doesnt work, plz help!

RAAAAH! I have finally ordered FPSC and Model pack 1!
Visual Dave
14
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 23rd Jan 2006 22:23
It seems this script will make the entity run circles around you.

If that's what you want, here it is....

I shortened it a bit. Hope this helps.

"The Honor is to Serve" - Lt. Worf
Conjured Entertainment
AGK Developer
15
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 23rd Jan 2006 23:34 Edited at: 23rd Jan 2006 23:50
Bullshock is right.
You called an invalid condition.
The addition of the dist is crucial.

You are also missing the colon that separates the conditions from the actions in each state.




The state identifiers are conditions.
Therefore state=0 has two conditions... state=0, and plrdistwithin=50.
We then place a colon to separate the conditions from the actions to be taken if said conditions are met.
State=1 has only one condition (it's identifier) so it is immediately followed with a colon.
All of it's actions are performed whenever it's single condition (state=1) is true.

Every state must have its conditions and actions separated with a colon.




Whatever you can imagine, you can animate. --- Walt Disney
All too easy. --- Darth Vader
Just do it! --- Nike
Visual Dave
14
Years of Service
User Offline
Joined: 30th Dec 2005
Location:
Posted: 24th Jan 2006 00:00
My post take about 12 hours to come up...sorry for the duping

"The Honor is to Serve" - Lt. Worf
brummel
14
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 24th Jan 2006 11:40 Edited at: 24th Jan 2006 11:41
Thanks everyone for helping me

Quote: "It seems this script will make the entity run circles around you.
"


I want it to run away a little bit from the player when the player is to close but it doesnt work properly. Insted he runs away when shot, but thats good enough.

Quote: "We then place a colon to separate the conditions from the actions to be taken if said conditions are met.
"


Ahh, so thats why i didnt work

Thank you for helping me.

RAAAAH! I have finally ordered FPSC and Model pack 1!

Login to post a reply

Server time is: 2020-09-24 23:11:31
Your offset time is: 2020-09-24 23:11:31