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 / Question regarding Scripting

Author
Message
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 1st Sep 2006 04:19
Hello all,

I have downloaded the FPI maker and was trying to build my own scripts (I guess there's nothing better than making a script to suit your own needs )

Anyways, my question is regarding the 'main' and 'shoot' scripts. I figure that the main script is what the enemy follows when the player is not around and that the shoot script is what the enemy follows when it finds the player. <--Pls correct me if I am wrong hereBut many scripts which I have seen (AI, Intellimatter etc) made by people here, have the shooting part in the same script as the main. So how exactly does it differ?

Can I make just 1 script which does all of the following :
1. Look around for player
2. If spot player, rotate towards him & shoot at him
3. If player tries to run, follow him
etc etc

Can I do that? Or do I HAVE TO make the shoot part in a seperate file?


Pls help

thank you

-- n00b at playing games...and now at making em too :p --
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 1st Sep 2006 15:59
Quote: "I figure that the main script is what the enemy follows when the player is not around and that the shoot script is what the enemy follows when it finds the player."


Not exactly. The main script determines what the enemy does. The "shoot" script is just one of the available scripts that can be the enemies main script.

Yes, all of those things can be accomplished in one script.

filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 2nd Sep 2006 01:41
thank you for your response xplosys.

If this is so, why exactly are 2 scripts needed?

Also, if I use the 'shootplr' keyword in the main script, does it mean the scripting will now jump to the 'shoot' script and follow that?

-- n00b at playing games...and now at making em too :p --
Nue B
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: Indy
Posted: 4th Sep 2006 04:17
two scripts are not needed. you can set the main to be what you would like the shoot to be, only you'd have to have your entity set to alwaysactive=yes this would let it hunt you down from the start of the game. The problem with always active is it will limit your number of active bad guys. If one is always active the others may not move until you kill the one. not much fun.

Nue B. or not Nue B. That is the question.
filya
18
Years of Service
User Offline
Joined: 23rd Aug 2006
Location: USA
Posted: 5th Sep 2006 07:05
ty Neu for the info.

So what if I dont set the always active to YES and still just use one (say 'shoot.fpi) as the main script? What happens then.

Sorry to bother you so much, but I am just trying to gather knowledge on how this works.

-- n00b at playing games...and now at making em too :p --
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 6th Sep 2006 17:46
Then the entity will follow the actions set forth in the shoot.fpi script.

The scripts included with FPSC are pretty much general scripts to support general actions and responses from the entities. They can be changed in most any way, and many of them incorporate parts from multiple scripts. You can change and add to them at will. Just make sure you save the original somewhere safe.

The alternate script can be called from your main script. If a certain condition exists, then the script will redirect the entities action to the alternate script using the RUNFPIDEFAULT=X command.

Check the script section of downloads on my site for a listing of script conditions, actions, and their meanings.

The forum provides a means to hide our true identity. Too bad we always screw up and let it be seen.

Login to post a reply

Server time is: 2024-11-23 00:30:26
Your offset time is: 2024-11-23 00:30:26