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 / Entity gives up on player

Author
Message
frenchpapa
10
Years of Service
User Offline
Joined: 14th Aug 2014
Location: No Clue
Posted: 27th Feb 2016 23:43 Edited at: 27th Feb 2016 23:58
another thread... But anyways I nee to know how an entity (NPC) can give up on the player if the player get far enough.
Corno_1
14
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 28th Feb 2016 08:39
It should be like:
state=x,plrdistfurther=500:state=x
PredicateC - FPSC to GameGuru FPE converter
https://forum.game-guru.com/thread/211068
frenchpapa
10
Years of Service
User Offline
Joined: 14th Aug 2014
Location: No Clue
Posted: 28th Feb 2016 17:50 Edited at: 28th Feb 2016 17:50
It does not work, but it 99.9 percent that I am not doing it right I know nothing about scripting, but I know what you told me was right
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 4th Mar 2016 11:01
@frenchpapa
How are you trying to use the script? Post/show what you have so far to help you better.
Are you using "waypoints" with this script. Need more info.
best
My games never have bugs. They just develop random features..
Lots and lots of random features...
frenchpapa
10
Years of Service
User Offline
Joined: 14th Aug 2014
Location: No Clue
Posted: 5th Mar 2016 01:27
im trying to make a scifi horror game and a specimen breaks loose, im wanting it to walk a waypoint. If the player is heard it attacks and if the player gets far enough it stops and continues it waypoint. The script is right here if you don't have it. one more question, how do you use code snippet?

desc = Random Melee Attack

;Triggers


:healthless=150:state=15,suspend,coloff,ragdoll,sound=audiobank\viral_outbreak\jaws_rage.wav

;STAND IDLE AND DETECT PLAYER WHEN CLOSE
:state=0,plrdistfurther=250:animate=92
;MAKE INVINCIBLE WHILE OUT OF ATTACK RANGE SO PLAYER CAN'T TAKE CHEAP SHOTS
:state=0,plrdistfurther=250,shotdamage=1:sethealth=200,animate=92
:state=0,plrdistwithin=250,plrcanbeseen:state=5,rotatetoplr,sound=audiobank\viral_outbreak\jaws_intro.wav



;CHOOSE MELEE ATTACK ROUTINE
:state=5,random=6:state=1
:state=5,random=6:state=6
:state=5,random=6:state=12



;MELEE ATTACK 1 (DOUBLE SLASH ATTACK/WALKING)
:state=1,plrdistfurther=65:rotatetoplr,runfore=10,animate=94
:state=1,plrdistwithin=65:rotatetoplr,setframe=95,state=7

:state=7,framebeyond=95 40,plrdistwithin=70:plraddhealth=-5,sound=audiobank\viral_outbreak\jaws_bite.wav,state=8
:state=7:incframe=95,rotatetoplr
:state=7,frameatend=95:state=5,sound=audiobank\viral_outbreak\jaws_intro.wav

:state=8,framebeyond=95 60,plrdistwithin=60:plraddhealth=-2,sound=audiobank\misc\melee.wav,state=9
:state=8:incframe=95
:state=8,frameatend=95:state=5

:state=9:incframe=95
:state=9,frameatend=95:state=5



;MELEE ATTACK 2 (SINGLE SLASH/RUNNING)
:state=6,plrdistfurther=65:rotatetoplr,runfore=10,animate=94
:state=6,plrdistwithin=65:rotatetoplr,setframe=96,state=2

:state=2,framebeyond=96 50,plrdistwithin=70:plraddhealth=-5,sound=audiobank\viral_outbreak\jaws_bite.wav,state=3
:state=2:incframe=96,rotatetoplr
:state=2,frameatend=96:state=5,sound=audiobank\viral_outbreak\jaws_intro.wav

:state=3:incframe=96
:state=3,frameatend=96:state=5


;RAGE ANIMATION/WALK CYCLE
:state=12,plrdistfurther=65:rotatetoplr,runfore=10,animate=94
:state=12,plrdistwithin=65:rotatetoplr,setframe=97,state=78

:state=78,framebeyond=97 20,plrdistwithin=160:sound=audiobank\viral_outbreak\jaws_awaken.wav,state=89
:state=78:incframe=97,rotatetoplr
:state=78,frameatend=97:state=5,sound=audiobank\viral_outbreak\jaws_intro.wav
:state=89:incframe=97
:state=89,frameatend=97:state=5,sound=audiobank\viral_outbreak\jaws_intro.wav
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 5th Mar 2016 03:14
frenchpapa First off...
Quote: "how do you use code snippet?"
Click at top the "code\misc. code" button, PASTE your code, then click "code\misc. code" AGAIN (that closes it) Same goes for quotes.
As for the script, appears to be from "viral outbreak" so I can't test it. But try this.
Quote: "im wanting it to walk a waypoint"
In your "scriptbank\people" folder you'll see a script called "follow" it makes a character follow a waypoint.

Paste this into at the top of your script.
Now to get it to stop if player is heard and chase you. Remember your other thread with "noiseheard=x" ?
At the top of your script get rid (delete) of the first two "state=0 lines, keep the last (bottom one) .
Replace "plrdistwithin=250,plrcanbeseen" with "noiseheard=x" X being the distance in segments to noise.
I'll use 300 for three segments distance.
Should look like this...


Keep the rest the same. The whole code should look like this...


Try this and see if it "breaks" waypoints after hearing noise and chases you.
Now there's two problems with this, first these are customs characters.
In the waypoints "animate=2" I dont know if that's a walking animation or something else?

Second...
Quote: "if the player gets far enough it stops and continues it waypoint"

I'm gonna have to think about this one. What if the waypoints are to far away to return to?
I'm not sure about this one. Give me a day to come up with something.


My games never have bugs. They just develop random features..
Lots and lots of random features...
frenchpapa
10
Years of Service
User Offline
Joined: 14th Aug 2014
Location: No Clue
Posted: 27th Aug 2018 21:39
I thought there would be a "Are you sure you want to reopen this thread" when I clicked to reopen it. Oops.

Login to post a reply

Server time is: 2024-11-21 13:33:57
Your offset time is: 2024-11-21 13:33:57