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 / This code I edited from the 'mob zombie' script has got me stumped for a solution

Author
Message
Archangel Sirius
13
Years of Service
User Offline
Joined: 30th Dec 2010
Location:
Posted: 15th Jul 2013 08:16 Edited at: 15th Jul 2013 08:18
Hey all, I've edited the mob zombie script to include waypoints so that the enemies can follow them then run toward the player. They do follow they waypoints correctly and run toward the player correctly (for the most part).
However there is always one enemy who just stands there until shot (there are only 4 enemies on the map at any given time). The second problem that did not occur until I edited this coding is that when shot, the injured zombie (any of them, not just the still one) seems to almost always retreat, possibly towards a waypoint.



I have looked through this code and can't seem to find what I did wrong to make said problems occur. Hopefully some more knowledgeable than I coders can look at this.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 16th Jul 2013 07:51
Hi Archangel Sirius
Since I don't have this pack/scripts I'm just taking a shot at this. Quick look and I noticed your "waypoints" you have "waypointstop"? Usually it's "waypointreverse" or the character just stops. Then the "plrdistfurther & plrdistwithin", (100=one segment) You have 50000 for one and 1000 for another, way too large of a number. plrdistwithin=1000 (ten segments) might do, but depends on what your trying to achieve (how large is the area?)
Also at "state=79" you have "plrdistwithin=16" way too small of a number(that's 16% of one segment) Usually it's 60, or maybe it's suppose to be "160"?
I would start over, remember to always make backups of originals
when making changes.
best luck
Archangel Sirius
13
Years of Service
User Offline
Joined: 30th Dec 2010
Location:
Posted: 16th Jul 2013 08:13
True I'll give it another go. Didn't think about the waypointreverse part. The reason I put 50000 and 1000 is to make sure the enemy only runs towards the player when within 10 segments; the 50000 being just to make sure he moves when spawned. Don't recall why I put 16 but I'll change that back to 60 maybe 50. Thanks for the input, I'll let you know how it goes.
Archangel Sirius
13
Years of Service
User Offline
Joined: 30th Dec 2010
Location:
Posted: 25th Jul 2013 05:27
Well I've tinkered with the script and still nothing is solved. I've tried waypointreverse instead of waypointstop and I've messed with the distance variables to no avail. luckily I have a backup of the original script to compare to.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 26th Jul 2013 22:22
Archangel Sirius
By chance, what version of FPSC are you running.
Maybe someoneout there has had a similar problem
with this pack on a certain version?
Archangel Sirius
13
Years of Service
User Offline
Joined: 30th Dec 2010
Location:
Posted: 27th Jul 2013 04:22
I'm running version 1.19 with the community mod.
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 28th Jul 2013 08:07
Archangel Sirius
Good that you kept an "original" copy of your script. Also, I had a lot of problems with ver. 1.19 (glitchy and problems with scripts) and stayed with 1.18 until now, 1.20 betas. On top of that your running mod. The only thing I can suggest is to try another version. I know it's a pain, but an easy way to see if it is your version or the mod?
best luck
Archangel Sirius
13
Years of Service
User Offline
Joined: 30th Dec 2010
Location:
Posted: 4th Aug 2013 03:46
well I installed the latest beta and got rid of the mod and no change... Hmmm
ncmako
12
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 4th Aug 2013 23:55
Archangel Sirius
Quote: "However there is always one enemy who just stands there until shot "

There's still one who just stands there until shot, right?
And he's not "stuck"... just a thought try a setting in the npc properties called "always active" set it to "yes".
From the manual
Quote: "If set to YES the entity will always be active, no matter now far away the player might be. Useful when you want to ensure characters always look intelligent no matter where they are in relation to the player. Remember that AI time is critical, so don’t have too many entities using this."

See what happens?
best
Archangel Sirius
13
Years of Service
User Offline
Joined: 30th Dec 2010
Location:
Posted: 5th Aug 2013 06:49
I'm at work ATM but ill look into this when I get home never thought of that.

Login to post a reply

Server time is: 2024-04-19 01:09:15
Your offset time is: 2024-04-19 01:09:15