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 / Making allies

Author
Message
Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 12th Dec 2006 05:54
I was reading stuff on the forums and I have an idea about allies.

If you just want to make it look like you have allies (as in watching your allies kill stuff, very good for a story line) this is how you do it.

Take your ally and give him a script to set the enemy's name as the target (SETTARGETNAME), rotate to the target (you can make him follow waypoints and stuff before this happens), and use the weapon (you can get fancy and make him strafe while still facing the target), and activate the if used field with a value of 2. Put the enemy name in the ifused field. The enemy has a script so that if he is activated with a value of two he will die and activate his ifused field. In his ifused field is the name of a whole bunch of blood decals which are placed on the wall behind him and presently unactivated, so when he get's "shot" blood will "splatter".

The ally can then proceed to select a new target (an enemy with a different name), run towards it, and do the same thing.

The reason a value of 2 is used is so that if the enemy is shot by the player before the ally "kills him", he will shoot back with a script to stand still (so the blood on the wall makes sense).

Call it fake AI if you will but it works.


Note: when you first look at this you might think it's just a bunch of froo froo, but work it out and utilize it and it makes sense.
(there might be a mistake or two in here)
Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 12th Dec 2006 09:40
Here are the scripts I have made, they work awesome.

Ally:

:state=0:animate=1
:state=0,shotdamage=1:rotatetoplr
:state=0,activated=2:settargetname=blood1,activatetarget=2,state=1,setframe=11
:state=1:incframe=11
:state=1,frameatend=11:state=2
:state=2:runfpidefault=2

Enemy2:

:state=0:setalphafade=0
:state=0,activated=2:setalphafade=100,runfpidefault=1

Basically, the ally comes in and pops a couple of enemies and blood goes all over the wall.

Some of you might be interested to see how I overcame the common belief that you can't make a character "die" without actually shooting them or causing them damage.
Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 12th Dec 2006 09:44
Sorry, forum box went all funny.

The code under the first code snippet is actually for enemy1, and the code under the second is actually the start script for the blood entity.
tj990
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: In a radio shack
Posted: 12th Dec 2006 09:53
you can already have allies with butterfingers sensai ai
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 12th Dec 2006 12:05
exactly

WuTang
18
Years of Service
User Offline
Joined: 26th Aug 2006
Location: England , Cheshire
Posted: 12th Dec 2006 18:56
Though dosnt it mean having to replace your FPSC exe when this is simply FPI ?!?

vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 12th Dec 2006 20:06
@ WuTang

What??????????????

so what's the job?
Mikey spike
17
Years of Service
User Offline
Joined: 23rd Nov 2006
Location: UK, England
Posted: 12th Dec 2006 20:33
yes we all know Butters has made sensie but for some reason the doesn't work for me , also could some one post a screenty of the ally killing the enmey, thanks

[url]http://www.freewebs.com/mikey-spikey/index.htm[url]
Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 12th Dec 2006 21:27
Yes I know about sensei, but for some of us it doesn't work and this is an alternative.

I'll post a screenie when I get home.
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 12th Dec 2006 22:11
im trying this out right now!


"these shoes are 300 hundred dollars"-Shoes by Kelly http://smallgroup.be/
Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 13th Dec 2006 01:27
Screenie

Attachments

Login to view attachments
WuTang
18
Years of Service
User Offline
Joined: 26th Aug 2006
Location: England , Cheshire
Posted: 14th Dec 2006 20:30
Used these scripts and they didnt work p.s i also tryed changing the two enemy characters with the 1 & 2 script enemy1 & enemy 2


ally Script


Enemy1


Enemy2


Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 14th Dec 2006 21:19
Make sure you have the new 1.04 RC4 update.

Make sure the names of the enemies are enemy1 and enemy2.

To use these scripts effectively, you need to know how to script and how to understand them, that way you can change them to suite your needs. For example, at the beginning of the ally script there is a waypoint command, if you don,t place a waypoint near the ally, it won't work. The script is set up so that you have to stand beside the ally and press enter to make him do anything.

These scripts were designed to be changed and tweaked with.
It wasn't really the scripts that are valuable, but the concept that they show.

SS
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 14th Dec 2006 22:59
I checked this out, and gave it a go, but it's very limiting. By activating the enemies, you can't have them spawn.

Also, perhaps it would be better to just add

Quote: ":activated=2:runfpi=destroy"


of the regular shoot and main scripts of all the enemies, that way they'd react and fight like normal enemies but the ally could kill them.

With regards to the ally, it might be sensible to use the "followplr" command to make him follow the player as opposed to a waypoint. it kind of makes him look dumb if he always goes the same way. if you used the above idea for the enemies, it wouldn't matter if didn't follow the same path.

Finally,
I don't get why the "settarget" command in RC1.04 is dodge. The one in emptys mod lets entities target, shoot, and kill each other. I don't care what merranvo says, it works, theres a video proving it in the showcase forum (search "sensei")

Good work though, its nice to see more people getting into scripting. I think this is probably the best solution to the allies problem for the RC1.04 users. Could do with alot of fine tuning, but stick at it.

Slayer Simon
18
Years of Service
User Offline
Joined: 11th Oct 2006
Location:
Posted: 15th Dec 2006 00:08
The reason you can't just use [quote]:activated=2:runfpi=destroy is that when the ally kills the enemy, the enemy would just stand there and become inanimate, if the player doesn't actually shoot the enemy you have to run the animation yourself with the script.

You want the enemies to also use there original scripts? That's easy, just incorporate this script with their original script. Read my other post, it's not the script that's important but the scripting technique. If you don't want the waypoint commands, take them out and insert the player trail command instead.

You have lots of stuff going on with FPSC, you must know how to script.

SS
SunnyKatt
18
Years of Service
User Offline
Joined: 16th Sep 2006
Location: USA
Posted: 15th Dec 2006 01:43
sensei is good except
1. it uses that mod
2. you cant use it commercially
3. its a tad buggy
but its still awesome

IM NEVER ONLINE TILL SOMETIME AT NIGHT!!! god dont expect me to be sitting at my computer all the time
Gam3r
18
Years of Service
User Offline
Joined: 15th Mar 2006
Location:
Posted: 15th Dec 2006 03:26
zeke im pretty sure lee added the command so it works with 1.04 now too

The Beta Cell Website 3% http://tbc.redlime.org
Wanna help me make an all new FPSCreator Resource website?
Submit your media for public use here! http://fpsc.redlime.org
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 15th Dec 2006 04:00
Quote: "The reason you can't just use activated=2:runfpi=destroy is that when the ally kills the enemy, the enemy would just stand there and become inanimate, if the player doesn't actually shoot the enemy you have to run the animation yourself with the script."


then, use what I said, and script the death animation into the destroy script.

Quote: "it's not the script that's important but the scripting technique. If you don't want the waypoint commands, take them out and insert the player trail command instead."


Kinda patronising. I wasn't complaining about the waypoint thing.. I was giving you some advice on improvement.
Quote: "
You have lots of stuff going on with FPSC, you must know how to script."


I do, that's why I was offering my opinion sarcasmo.
Forget it dude, you keep doing this, and I'll do my thing, and we'll just be autonimous, saves on upsets.
Quote: "
1. it uses that mod
2. you cant use it commercially
3. its a tad buggy"


1. Yep it does. But, it's the most effective mod for allies out there.
2. For GOD sake read the licence. The new version of sensei is much less restricted
3. And less buggy... I'd like to add that most of Sensei's bugs come from user error, and that if I'd written a better manual, it wouldn't have had so many problems.
Quote: "but its still awesome"

cheers!

Login to post a reply

Server time is: 2024-11-23 07:53:36
Your offset time is: 2024-11-23 07:53:36