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 / Zombie Script

Author
Message
Gunner54
17
Years of Service
User Offline
Joined: 13th May 2007
Location:
Posted: 14th Oct 2007 15:49
OK, i want to make a script where the entity (Zombie) walks like a zombie and follows a waypoint. OK i done that. Thats pretty simple... BUT if the Zombie see's me it will walk after me and attack me.

Sorry for being a bit nubish... im a beginner.
funny
17
Years of Service
User Offline
Joined: 28th Jul 2007
Location:
Posted: 15th Oct 2007 04:00
U can test this...Not need to put waypoints


;Artificial Intelegence Script
;Header
desc = waypoint+attack for zombie

;Triggers
:state=0:waypointstart
:state=0,plrwithin,plrdistfurther=601:state=0
:state=0,plrwithin,plrdistwithin=600:state=20

:state=1,plrcanbeseen:movefore=10,animate=3,state=20
:state=1,shotdamage=1:movefore=10,animate=3,state=20

;-=>>>WAYPOINTS<<<=-
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse

;///PLR FOUND\\\
:state=20,plrdistfurther=50,plrcanbeseen:rotatetoplr,movefore=20,animate=5
:state=20,plrcannotbeseen:state=40
:state=20,shotdamage=1:strafeforward
:state=20,plrdistwithin=50:state=50

;///Look For Plr\\\
:state=40,plrcannotbeseen,random=3:timerstart
:state=40,plrcannotbeseen,random=3,timergreater=30:rotateheadrandom=50
:state=40,plrcannotbeseen,random=3,timergreater=40:pivotrandom=50,movefore=20,animate=2
:state=40,shotdamage=1:rotatetoplr
:state=40,noiseheard=60:rotatetoplr
:state=40:state=20

;///MELEE\\\
:state=50:setframe=6
:frameatend=6:plraddhealth=-5
;///:state=50:plraddhealth=-5
:state=50:state=51

:state=51:incframe=6
:state=51,frameatend=6:state=52

:state=52,plrcanbeseen:state=20
:state=52,plrcannotbeseen:timerstart,state=40

:state=53:movefore=16,animate=5
:state=53,timergreater=1000:state=20

;end of script

funny
Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 16th Oct 2007 19:30
that script doesnt work for me. When I put it onto a character and tests the game I loose all my health and dies untill I shoot the character.

Visit our new website! www.bigvikinggames.tk !New Forum is up!
Follow the progress of Lost Treasures
funny
17
Years of Service
User Offline
Joined: 28th Jul 2007
Location:
Posted: 16th Oct 2007 21:12
Strange it work fine for me...
You put in this in 'main script' ?
I've test this with zizombie and it ok : zombie walk, and if he see U, run and attacks...

sorry for my bad english friends...

funny
Sloan
17
Years of Service
User Offline
Joined: 6th Oct 2007
Location: this forum
Posted: 16th Oct 2007 21:59
@funny,
What is the line :state=53:movefore=16,animate=5 used for?
Is this a fast walk if no other states are met?

Just trying to understand the code...thanks
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 16th Oct 2007 22:23
Quote: "U can test this...Not need to put waypoints"


Really? I think this is incorrect. Without waypoints, how will the entity follow this command?

;-=>>>WAYPOINTS<<<=-
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse


Own It, Or Get Owned...
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 18th Oct 2007 08:28
@Sloan:

State 53 is not used in his script, as no where in the code does it ever tell the entity to enter state 53. You could just delete that.

But if it did, then it would make the entity "move forward 16 units" while playing animation 5.


The one and only,
~PlystirE~

Dammit, Jim! I'm a programmer not a graphic designer!!!
Sloan
17
Years of Service
User Offline
Joined: 6th Oct 2007
Location: this forum
Posted: 18th Oct 2007 20:22
Thanks PlystirE.

Login to post a reply

Server time is: 2024-11-23 23:40:12
Your offset time is: 2024-11-23 23:40:12