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 / How to get enemies to follow the path of the player and open doors?

Author
Message
King Of Khaos
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location: Not ALL the windows were locked...
Posted: 10th Apr 2012 00:43 Edited at: 10th Apr 2012 00:53
I made a thread about this a long time ago for the Hag character, and I've gotten a little better at scripting since then, but I still can't get the Cleopatra MELEE character to follow the PATH of the player, and open doors if the player decides to close them. Normally, Cleopatra just goes in the DIRECTION of the player, completely ignoring walls. So when the player rounds a corner, she just runs into it until she slides past it. This is how most enemies work, but I've always found it pretty annoying. Especially now because I can't get my solution working. I know it's possible to make the enemy follow the path of the player and open doors, because in my old thread, Conjured Entertainment helped me accomplish this with the hag character. So what I tried was taking the part of that script that I thought made the enemy do this, and combined it with the Cleopatra script I have. I've already successfully combined a dialogue script with the original Cleopatra main script, and it works perfectly, which I'm proud of myself for . Except for the fact that she runs into walls. I've tried everything I can think of, but still no luck. So could someone please help me out here? Maybe tell me what I'm doing wrong? Am I even using the right commands?



"Never tell me the sky's the limit when there are footprints on the moon."
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 11th Apr 2012 16:44 Edited at: 11th Apr 2012 16:53
i think you missed the action "followplr", wich sets the character to follow the trace of the player. a good way to ignore collision problems.

for opening nonlocked doors, you should try this:

:nearactivatable=1:settarget,activatetarget=1,state=x

activatetarget=1 is the standard-activation, maybe 2 does something else. state=x has to be a basic state to get into the basic behavior again.

3.4.1.9 NEARACTIVATABLE=X
Description: Is true when an entity is within 70 units and the activation value for the entity is X. If true the activatable entity is set as a possible target.
Range: X = 0 to 100,000,000 (above 100,000,000 causes variable problems)
Example: :nearactivatable=0:state=1

3.5.2.2 FOLLOWPLR
Description: This makes the entity follow the player. The entity will follow the markers dropped by the player and not simply head towards the player‟s current location. To make the entity head towards the player, the player‟s markers must first be reset. It should be noted that the Dark AI action “aifollowplr” is designed to be a much more improved action over this one.
Example: :state=0:followplr

King Of Khaos
15
Years of Service
User Offline
Joined: 25th Feb 2009
Location: Not ALL the windows were locked...
Posted: 13th Apr 2012 14:16
I already got it to work, I just didn't bother updating this thread because I thought it had already died down. Thanks anyway though.

"Never tell me the sky's the limit when there are footprints on the moon."

Login to post a reply

Server time is: 2024-11-23 23:31:00
Your offset time is: 2024-11-23 23:31:00