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 / Tactical Shooter Friendly AI Script

Author
Message
CJtac
18
Years of Service
User Offline
Joined: 27th Nov 2005
Location:
Posted: 28th Nov 2005 21:05
Does anyone know how to write a script for friendly AI that can help you in the game? Or even better, AI you can order to cover a location or attack a enemy with a push of a key?

CJ

Unknown, Unconquerable!
Getix Interactive
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: US
Posted: 29th Nov 2005 02:59
I wish someone would write this code for all to see... I want to add Allies also.
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 29th Nov 2005 08:04 Edited at: 29th Nov 2005 08:28
.

Meranvo wrote a script for Allies.
I think he ran into problems getting the Allies to do any damage to the Enemies.
I think he said he got them to shoot at each other but they did no damage.
If memory serves he said that the problem was that the Engine did not support this.

I do not follow Riker 9's Progress, but I think that Celbloc might be planning to incorporate this.
You may want to check the Riker 9 thread.

EDIT
Now, I'm having a flashback about this.
I think someone suggested having the allies activate the enemies and thus force them to call their destroy script.

The problem with that is that each one could only call one enemies script.
Unless all the enemies were named the same, but then they would all die each time he killed one.
On the other hand....I just got an idea that I think will work.

I've never attempted an Allies script.
It does sound very time consuming to figure out and test.
Maybe I can try it, after I get my next Pack finished.

If I take the time to get an Allies Script to work properly, would you be mad if I charged for it?
I mean, if I make it part of a Pack.




Whatever you can imagine, you can animate. --- Walt Disney
All too easy. --- Darth Vader
Just do it! --- Nike
CJtac
18
Years of Service
User Offline
Joined: 27th Nov 2005
Location:
Posted: 29th Nov 2005 15:15
If you can make a script like I described that works, I'll pay for it.

Unknown, Unconquerable!
flashing snall
19
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 29th Nov 2005 22:15
i think ever one would WANT to have it free, but no one (ithink) will be MAD if you do...

dont assune cause u make an ass out of u and me
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 30th Nov 2005 21:34
[quote]Meranvo wrote a script for Allies.
I think he ran into problems getting the Allies to do any damage to the Enemies.
I think he said he got them to shoot at each other but they did no damage.

I would like to have the allies script that makes them fire on each other even if they not damaged each other, i mean, it makes an illusion that makes the player think they´re helping him/her kill the enemy.

You better were daipers when you play my games, because you´re gonna shit yourself when you play my games
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 1st Dec 2005 00:32 Edited at: 1st Dec 2005 06:27
@King of the World
You need to hit that Quote button again to end the quote. (Notice the Asterisk on the Quote Button)
Your post was delayed and did not appear until after I posted becasue you are new.
The problem with that is if you don't shoot then the "illusion" won't stop the enemy from killing you.
I might throw it in there anyways.
It would be good to have choices.


@ CJTac

Okay,
I'm booked with other stuff for a couple weeks.
When I finish the Pack I am working on, then the Allies/Enemies Pack will be the next Project.

Making him hold a postion or attack with the push of a key will make it more difficult.
If I can get it to do that, then it will have to be set up as a toggle.
This is because I only have one key to use for input (Enter Key).
So, here's how he should work if all goes well.

He will be passive until you walk up to him, then he will ask you if you want his help.
You can hit enter to accept his help or simply walk away.

Once you accept, then he will follow you and fight enemies until you hit enter again.
Then, he will hold that position attacking enemies until he dies or you hit enter again.

In other words, once you hit Enter the first time then he is your helper until he dies.
From then on the Enter Key would toggle whether he follows or stays in one place.

Again this makes things more complicated, so the price will depend on how much trouble it is.
I think I can do it, but getting the conditions and actions to work can get tricky when you get fancy.
Theres nothing wrong with them, it just makes me more prone to logical errors.
I think I can do it though, but no promises other than I will attempt it.
I can not guarantee success, but I really think it can be done.
It will take multiple Scripts in order for it to work.
(at least the way I'm thinking of doing it)

The only problem I foresee is your helper getting caught up on corners when following.
So, open areas would be better to use him in, rather than expecting him to follow down turning hallways.
Maybe this can be worked around too, but again no gaurantee.

Also, since his death would be called rather than the enemies doing damage to him,
his lifespan would have to be either on a timer, or based on his kill count.
I will try to code it both ways, so the user can edit out the method he doesn't want with semi-colons.






Whatever you can imagine, you can animate. --- Walt Disney
All too easy. --- Darth Vader
Just do it! --- Nike
brummel
18
Years of Service
User Offline
Joined: 26th Nov 2005
Location: Sweden
Posted: 1st Dec 2005 08:40
That sounds great to me!

You better were daipers when you play my games, because you´re gonna shit yourself when you play my games
CJtac
18
Years of Service
User Offline
Joined: 27th Nov 2005
Location:
Posted: 1st Dec 2005 18:31
Me too.


Conjured Entertainment;
No rush. If your plan works it will be worth the wait.

Unknown, Unconquerable!
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 1st Dec 2005 21:47
I don't know much about scripting... but isn't there an activate target? Couldn't you "Set" the Enemy as a target? And if the enemy is shot, to set the "Ally" as the target?

And technically, couldn't you build it entirely in the activateds? and use the IncState=1 as health?

But then again, I don't know much about scripting.
=ChrisB=
19
Years of Service
User Offline
Joined: 23rd Jun 2005
Location: starring into a viewfinder
Posted: 1st Dec 2005 21:50
Yea, you don't.

Are you about to rock?

Then [b]I SALUTE YOU!!!
Sinistar
20
Years of Service
User Offline
Joined: 23rd Jul 2004
Location:
Posted: 17th Dec 2005 00:11 Edited at: 17th Dec 2005 00:15
You could have enemies activate other enemies and then call their destroy script.



...Oh hahah I didn't read that up there!

It would still be a nice effect if you had enemies that sort of only attacked ONE other enemy on the other side. Like calling your guy in a basketball game and ignoring the rest. OR you could have a state for every enemy in every ally's script such that it picks one based on something like plrdistfurther or something.
MR elevetor
19
Years of Service
User Offline
Joined: 4th Sep 2005
Location: you wouldn\'t belive me if I told you
Posted: 21st Dec 2005 17:50
the riker 9 will have allies support!

Fpsc propably the best program in the world.
=ChrisB=
19
Years of Service
User Offline
Joined: 23rd Jun 2005
Location: starring into a viewfinder
Posted: 21st Dec 2005 19:11
The only way entitys can kill eachother is via an explosive device, aka law, bazoka...

Chris: Oh god it feels good to be outta the F**king shoos!
Sterling: I know! It feels good to be outta these cloths too!
Wheelgator is a ricist. What? I swear! He called me a n***r!
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 21st Dec 2005 21:29
or activating each other.

Anti-Noob Justice League, an ANJL of Mercy.
[url=ochanicon.gif]
Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 22nd Dec 2005 00:51
one problem with the "Following Ally" script is that when you came to a door, and pressed enter to make it open, the ally would stop following you. And when you press enter again to get the ally to follow you, the door would shut

When FPSC develops enough, lets make a Redwall game!

Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 22nd Dec 2005 03:08 Edited at: 22nd Dec 2005 03:08
I never made that script, I would never support that either.

But why buy a script when there is a better script in a few mouths? Riker 9?

::settarget,activatetarget=2
:plrdistfurther=400:rotatetoplr,movefore=6
:activate=0,anywithin=400:rotateiy=10
:activate=1:incstate=1,activate=2
:state=50:activatetarget=0,runfpidefault=3

just a sketch of a better one, note, this probally doesn't work.
It is both ally and enemy, but doesn't attack the plr, and kinda spins randomly... but it is the general idea.

This is patented under the Laws of Merra Tech, a new Country. and may not be used to create revenue.

Anti-Noob Justice League, an ANJL of Mercy.
[url=ochanicon.gif]
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 22nd Dec 2005 04:28 Edited at: 22nd Dec 2005 04:34
Quote: "or activating each other."

Yes, of course.
all in zone tehehehe

A certain activation state could be a default 2 for enemies while being an attack for allies.



Quote: "one problem with the "Following Ally" script is that when you came to a door, and pressed enter to make it open, the ally would stop following you. And when you press enter again to get the ally to follow you, the door would shut "

I use a timer for the Enter Key Toggles.
You actually have to hold the button down for a second or two.
Tapping the Enter Key to open a door does not effect the Toggle.





Whatever you can imagine, you can animate. --- Walt Disney
All too easy. --- Darth Vader
Just do it! --- Nike
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 22nd Dec 2005 04:42
or double tapping... if your doing what I think.

Of course, I think I'll patent Ideas now.
You were originally just wanting to blow each enemy up, I was the one who told you how to activate other enemys, although it may not be as easy as I think, but activating enemys is still doable. And my current script thingy ^^ is better then what you insist on doing. Do yourself a favor, use it. and if activating targets don't work, you have others ways.

Anti-Noob Justice League, an ANJL of Mercy.
[url=ochanicon.gif]
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 22nd Dec 2005 04:48 Edited at: 22nd Dec 2005 04:53
Who are you talking to?

Quote: "You were originally just wanting to blow each enemy up, I was the one who told you how to activate other enemys"


I'm not the one who wanted an allies script.


Quote: "And my current script thingy ^^ is better then what you insist on doing. Do yourself a favor, use it. "


I'll do myself a favor.
I'm out of it.

My Allies Script is canceled.
Get Merranvo to do it.

I don't feel like arguing with him again.





Whatever you can imagine, you can animate. --- Walt Disney
All too easy. --- Darth Vader
Just do it! --- Nike
Les Horribres
19
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 22nd Dec 2005 04:51
but wasn't that your sudjestion?

Anti-Noob Justice League, an ANJL of Mercy.
[url=ochanicon.gif]
Copper Head
18
Years of Service
User Offline
Joined: 10th Dec 2005
Location:
Posted: 24th Dec 2005 23:57
This is once more subject to the incompletion of FPSC. The action "settarget" would solve this problem right up swift and easy had it not been that the only two things it seems to be taking as parameters are the player and weapon pickups. So unless it's a very specific enemy you want to address with your allied fire (reached by name) you can not make this work. The major problem in this whole thing is that it seems there's no way to detect or make an entity aware of any unknown entity but the player. The only condition i can find in this cathegory is "anywithin" and "anyfurther" and those include even walls and stuff into its area of detection so you can't ever distinguish what it is that is being detected.

In my opinion the two biggest flaws in FPSC is that you can't set up global, or even more local, variables and that you can't detect nor ID entities from within a script thus not be able to address them with actions. I wonder, do they still at all care about this product enpough to be planning some sort of update or at least completion of it or will all possible future updates fully rely on users that apply their own edits to the source code released?

Login to post a reply

Server time is: 2024-11-21 17:10:44
Your offset time is: 2024-11-21 17:10:44