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 Product Chat / Special script needed for an egyptian character.

Author
Message
Clarika
16
Years of Service
User Offline
Joined: 2nd Mar 2008
Location: Liège, BELGIUM
Posted: 7th Mar 2008 16:19
Hi! I just would like to modify the "pharaoh2-slowfast" fpi script to make the entity first follow a waypoint(like a "pace.fpi") and then, when the player is seen, react like the original "pharao2-slowfast" fpi and forget the waypoint. Can someone help me? Thanks.

Clarika
bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 8th Mar 2008 23:11 Edited at: 8th Mar 2008 23:15
I got you covered! This requires two scripts to work. I've attached a script called "pharaoh-waypoint.fpi" that you need to place in your scriptbank/people folder.

Right click on the pharaoh and select this as his "Main" script. Then, go down to his "Shoot" script and change it to "pharaoh2-slowfast.fpi"

That's it! He will follow a waypoint until you get within a certain distance and can see you. Once he does he will abandon his waypoint and start attacking you!

Great idea Clarika, hopefully others will find this useful too.

**hint** This will work on MP18 characters too, I can see how this would be useful for sneaking past some crusaders guarding a castle or something.

----------------------------------------
"Your mom goes to college."

Attachments

Login to view attachments
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 8th Mar 2008 23:28
Thank you both. Clarika for asking this and Bond for providing a simplified answer. More simplified than I would have made it.

I never understood how the "Shoot" scripts interacted with the main scripts. Now I think I have a better understanding. I actually would have made a very complicated script using both of those scripts. Combining them as one and having them play in the "Main" script slot. That can be done as I have done this before with other scripts.

My life has now been made a little easier.
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 8th Mar 2008 23:31
Mark, will the attached script work with stock and other model pack characters?

bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 8th Mar 2008 23:39 Edited at: 8th Mar 2008 23:40
Actually yes Higgins, I see no reason why it wouldn't work.

The script does this:

Enemy follows waypoints until these two conditions are met:
1)Player gets within 300 units of enemy
2)Enemy can see player

Then the script basically tells the enemy to run the script specified in the "Shoot" property. It's cool because if the enemy is walking a waypoint AWAY from you, you can sneak past them. It's only when they turn around and see you that they run the "shoot" script.

----------------------------------------
"Your mom goes to college."
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 8th Mar 2008 23:48
Thats good, because I can now make some stealth levels such as escaping from some hill billys house, so if your seen your dead

Thanks for this Mark.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 9th Mar 2008 00:01
I just tried it and it works great. You can of course tweak the distance to anything you like. 300 does seem good. I used a fantasy character in the test. Set him facing away from the player and then set the waypoint going away from the player. The player is just right behind the character and because he can't see me yet does not react. Without moving the player I let the character travel up the way point away from me and then he turned around. He started back but didn't do anything until he was within 300 units (when he saw me) and then attacked.

The next test was when he started up the waypoint, I moved the player way around him and he never saw me. So I snuck around him as it were.
bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 9th Mar 2008 00:09 Edited at: 9th Mar 2008 00:11
Good to hear it's working. (It worked for me of course, but you never know about these things).

Yes, I think messing around with the distance, as well as the enemy's view cone angle would give a lot of flexibility. I always liked the stealth aspect of games rather than the Rambo-shoot-everything that moves. Now that we have headshots it's even better - pick off enemies from behind while on waypoints.

Or a bash on the head from behind with my free mace - sweetness.

----------------------------------------
"Your mom goes to college."
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 9th Mar 2008 00:45
I just tested it with a thug and it works great, but there is one slight problem. He will stand on the spot and not return to his waypoint if you are out of sight.

I'm using the shoot script.

Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 9th Mar 2008 00:55 Edited at: 9th Mar 2008 01:02
I love your mace.

Speaking of which, is there a way to get rid of the little white dot. I suppose some people might like that but I'm funny that way.

Not trying to hijack the thread.
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 9th Mar 2008 01:07
@ Higgins

I just tried the thug with the pistol. In the main is the "pharaoh-waypoint.fpi" and I left the shoot script as is which happens to be "chase10.fpi"

The way point I used for testing this one is just a simple straight line. I moved far around the thug as he was walking away and then stopped and watched him go back and forth along the waypoint. I then moved in closer to him (his view cone angle default is not very wide so had to get almost in front of him) and he then starting to shoot and then to chase me. So, not sure what might have happened in your test?
bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 9th Mar 2008 01:30
Higgins, I think I know what you're saying. You want a way for the thug to exit the "shoot" script and return to the waypoint script once the player is out of sight. Let me give it a try, I suspect I'll have to alter the shoot script.

Flatlander, I'll give you and empty crosshair for the mace, give me a bit...

----------------------------------------
"Your mom goes to college."
Flatlander
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 9th Mar 2008 01:46
Bond, if it's no trouble. Do really appreciate all your work and effort.

Yea, that would be cool for the character to return to the waypoint. Didn't even think of that. Hmmm? Wonder how complex that might be?
bond1
19
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 9th Mar 2008 01:49 Edited at: 9th Mar 2008 01:58
@Higgins:

I got it working! Ok, first copy the "pharaoh-waypoint.fpi" script to your main scriptbank folder, this is important since I can't seem to access the "people" subfolder via scripting. Like before, use this as the thug's main fpi script. Next, I've attached a script called "shoot-returntowaypoints.fpi". Also place this in your main scriptbank folder and use this as the thug's "shoot" script.

Now, the thug will walk waypoints until he sees you, then he will shoot you. If you run and hide behind a wall, he will return to his waypoints until he sees you again - tested and working!

This will work for any script you specify as "shoot". Just add the lines:

:plrcannotbeseen:runfpi=pharaoh-waypoint.fpi

That's it!

----------------------------------------
"Your mom goes to college."

Attachments

Login to view attachments
SpyDaniel
18
Years of Service
User Offline
Joined: 4th Feb 2006
Location: United Kingdom
Posted: 9th Mar 2008 03:21
Thanks Mark, ill try it out tomorrow.

Clarika
16
Years of Service
User Offline
Joined: 2nd Mar 2008
Location: Liège, BELGIUM
Posted: 11th Mar 2008 09:34
Lot of thanks for your solution, Mark and Daniel. It works great! Have a nice day.

Clarika.

Clarika

Login to post a reply

Server time is: 2024-11-27 18:50:31
Your offset time is: 2024-11-27 18:50:31