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.

Author
Message
whats wrong with this script!
15
Years of Service
User Offline
Joined: 23rd Sep 2010
Location: TOP SECRET
Posted: 24th Sep 2010 00:42
need help with this script. ive been tryin to make a script where the entities search for me but, when in a zone,they have to be up close. the player would be set to 0. but right off the bat they come straight at me. somebody please help me.

;Artificial Intelligence Script

;Header

desc = find player and shoot plr, if loose plr, resume search.

;Triggers

:state=0:globalvar=1,state=1
:state=0:waypointstart,setframe=19

:state=1,plrcanbeseen,varequal=0,state=2
:state=1,plrcanbeseen,varequal=1,state=40
:state=1,random=20:rotateheadrandom=65
:state=1,shotdamage=1:settarget,animate=1,rotatetotarget,resethead,state=40
:state=1,noiseheard=5:settarget,rotatetotarget,state=20

:state=2,losetarget=100:state=0

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

;///PLR FOUND\\\
:state=20,plrcanbeseen:state=50
:state=20,plrcannotbeseen:state=40

;///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=55,movefore=10,animate=2
:state=40,shotdamage=1:rotatetoplr
:state=40,noiseheard=60:rotatetoplr
:state=40:state=20

;//ATTACK\\
:state=50,plrcanbeseen:state=51,settarget
:state=50:runfpidefault=1

:state=51,losetarget=100:state=0
:state=51:rotatetoplr
:state=51,plrcanbeseen:settarget
:state=51,ifweapon=1,plrdistfurther=400:movetotarget=1,animate=5

:state=51,plrdistwithin=101:rotatetoplr
:state=51,ifweapon=1,plrdistwithin=401,plrcanbeseen=46,rateoffire:animate=1,rotatetoplr,freeze,useweapon,rundecal=6
:state=51,ifweapon=0:animate=1,freeze,state=52,setframe=6
:state=51,plrdistwithin=700,random=50:state=55
:state=51,plrdistwithin=300:state=60
:state=52:incframe=6
:state=52,frameatend=6:state=51,reloadweapon,sound=audiobank\guns\reload.wav

:state=55,random=1:state=56,setframe=4
:state=55:state=57,setframe=3
:state=56:incframe=4,strafe=90,rotatetoplr
:state=56,frameatend=4:state=51,animate=1
:state=57:incframe=3,strafe=-90,rotatetoplr
:state=57,frameatend=3:state=51,animate=1

:state=60:state=61,setframe=5
:state=61:incframe=5,strafe=180,rotatetoplr
:state=61,frameatend=5:state=51,animate=1

;End of Script


heres the zone

;Artificial Intelligence Script

;Header

desc = Stealth Trigger Zone Stock

;Triggers

:state=0:globalvar=1,setvar=1,state=1
:state=1,plrwithinzone=1,scancodekeypressed=46:setvar=2,state=2
:state=2,plrwithinzone=0:state=0

;End of Script

l
Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 25th Sep 2010 00:24 Edited at: 25th Sep 2010 00:25
These lines only contain a single colon ( : )


Each line must have 2 colons in order to function properly. The above lines would be corrected to the following:


Notice that I changed the commas before the last command into a colon. This is so that the commands following that colon are recognized as actions, otherwise the engine will assume they are conditions.

See if that assists in fixing the problem. It may not solve the problem entirely, but it's a place to start.


Also, please name your threads more appropriately. Name the thread specifically to reflect what your thread is about, so that it is easily found in searches by users later on.


The one and only,


whats wrong with this script!
15
Years of Service
User Offline
Joined: 23rd Sep 2010
Location: TOP SECRET
Posted: 25th Sep 2010 05:58
ty you go back thru it and see what i come up with then ill post it if its working properly.

l
AJ Schaeffer
16
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 25th Sep 2010 22:19
READ THE RULES PLEASE
UNHELPFUL TITLE
Try to be more specific in your title, so people will be more likely to help you.

--ajschaeffer

Plystire
23
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Sep 2010 04:24
Quote: "ty you go back thru it and see what i come up with then ill post it if its working properly."


Okay, hope it starts working for you.


@AJ:

Read the rules yourself, please. Offtopic posting is also not allowed. Leave the 'RTFM' posts to the moderators, ok?


The one and only,


Nickydude
Retired Moderator
19
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 28th Sep 2010 20:39
Unhelpful Titles

Please do not simply write "Noob Question", "I am a newb", "One Noobie Question", "A question", "Please help", "This isn't working" or anything similar as the title of your post. We have a search facility, and meaningless titles do not help others find answers to their questions. It will also help you to get quicker responses if people have an idea of your thread content.



For KeithC

Login to post a reply

Server time is: 2026-07-26 05:23:04
Your offset time is: 2026-07-26 05:23:04