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 / script almost working

Author
Message
cartman
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location:
Posted: 5th Aug 2008 21:56
Hi this script is designed to make an entity follow a way point. If it spots the player it comes away from the way point chases and shoots. If it loses the player it goes back to the way point. The bit that is not working is the shooting bit. not sure why. could do with a few thoughts!!! (Script below!!)

;Artificial Intelligence Script

;Header

desc= Pace Waypoints, If See Player then Rotate to, follow And Kill!!! (if lost back to waypoint!)

;Triggers

:waypointstate=0:animate=0,waypointstart
:waypointstate=3:animate=0,waypointnext
:waypointstate=4:animate=0,waypointrandom
:waypointstate=5:animate=0,waypointreverse
:nearactivatable=0:settarget,activatetarget=2,animate=0,state=0

:state=0,plrdistwithin=150,dropmarker:state=2
:state=2,plrdistfurther=50:waypointstop,rotatetoplr,animate=0,movefore=2,loopsound=audiobank\user\dalek\exterminate.wav

:state=2,plrdistfurther=150:resethead,nextmarker,waypointnext,stopsound
:state=2,plrdistwithin=40:state=3
:state=3:shootplr

;end of script
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 5th Aug 2008 23:54
your state 3 needs to loop back.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 6th Aug 2008 02:31
No, it doesn't actually. "Shootplr" tells the script to run the script given to the entity in it's "Shoot AI" field in the properties.

Another thing, "dropmarker" isn't a condition, it's an action.

It looks to me like you're trying to make the script way too simple for what it needs to be doing. Here are a few things to consider:

- Checking "plrdistfurther" two different times in the same state is a bit unconventional and may only be helpful in certain situations. You may want to try splitting those up into their own states.
- "Shootplr" doesn't do what I'm willing to bet you're thinking it does. Probably look at the "useweapon" command instead as well as how to make your guy reload.


The one and only,


Whosoever says, "Don't sweat the small stuff," is obviously not a programmer.
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 6th Aug 2008 03:29
Sorry, I didn't catch that. I'm in the middle of a huge graphic design project.

Minimovies Inc
16
Years of Service
User Offline
Joined: 22nd Feb 2008
Location: Reeedwwwaaallll!!!
Posted: 6th Aug 2008 17:48
Enemy AI scripting is just not my thing...

A starting Games Designer. Need levels, characters and anything drawn and designed? Let me know...
Hybrid
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: In the p-block, group 7.
Posted: 6th Aug 2008 22:14
Neither is it mine, but I still try to help out anywhere I can. Does the script work?

cartman
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location:
Posted: 9th Aug 2008 17:42
Hi, Thanks. will investigate use weapon as a way forward (have been lloking at others scripts and have seen it used there also).

The waypoint part of the script works realy well and the enemy troops off back to the the waypoint path when you run away.

Login to post a reply

Server time is: 2024-11-24 12:06:59
Your offset time is: 2024-11-24 12:06:59