Hi everyone, this is my first attempt to scripting.
I would like to create a squad, consisting of 3 Computercontrolled players and 1 well, just you.
All the squad needs to do is to follow you and shoot everything in sight, but I still want them to be careful, not just to run into the enemy.
Examples are always welcome.
Thanks!
Scripting Squad AI
- ardentcrest
- Posts: 735
- Joined: Wed Jan 25, 2006 10:55 pm
- Location: Ireland
Re: Scripting Squad AI
This is an old script might need a little work to get working but it will give you an idea how to do it.
http://dodownload.filefront.com/1156349 ... bbf0f78f00
http://dodownload.filefront.com/1156349 ... bbf0f78f00
He's a Bot Jim, But not as we know It.
Re: Scripting Squad AI
I'll take a look at that, thanks.
- ardentcrest
- Posts: 735
- Joined: Wed Jan 25, 2006 10:55 pm
- Location: Ireland
Re: Scripting Squad AI
I know its an old post. but can someone take a look at the scripts in the link of my other post. I cant get it to work.
I can see 4 others ( yes they are facing the ground I changed that on my computer)
and yes the keys to pick each one are the keys for the first 4 wepons I canged them also
but no matter what i do i cant choses any of the others.
I someone can get this to work it would be a great addtion to the community.
I can see 4 others ( yes they are facing the ground I changed that on my computer)
and yes the keys to pick each one are the keys for the first 4 wepons I canged them also
but no matter what i do i cant choses any of the others.
I someone can get this to work it would be a great addtion to the community.
He's a Bot Jim, But not as we know It.
Re: Scripting Squad AI
I tested it and found the problem. The GetAttribute() and SetAttribute() commands were changed since the version those scripts are made for. Just change the line
in each of the player scripts to:
And a little modification to ccontrol.s:
That should do the trick if you've followed the instructions in the read-me file.
Code: Select all
if(GetAttribute("character")=1)
Code: Select all
if(GetAttribute("character","Player")=1)
Code: Select all
//monitor character switching
if(IsKeyDown(K_CHAR1))
{
//switch active character
SetAttribute("character",1,"Player");
}
if(IsKeyDown(K_CHAR2))
{
//switch active character
SetAttribute("character",2,"Player");
}
if(IsKeyDown(K_CHAR3))
{
//switch active character
SetAttribute("character",3,"Player");
}
if(IsKeyDown(K_CHAR4))
{
//switch active character
SetAttribute("character",4,"Player");
}
Pain is only psychological.
- ardentcrest
- Posts: 735
- Joined: Wed Jan 25, 2006 10:55 pm
- Location: Ireland
Re: Scripting Squad AI
Thank Mr J.
This update to an old script is going to give the games and demos a good boost.
It will open new doors for the type of games we can now do.
This update to an old script is going to give the games and demos a good boost.
It will open new doors for the type of games we can now do.
He's a Bot Jim, But not as we know It.
- ardentcrest
- Posts: 735
- Joined: Wed Jan 25, 2006 10:55 pm
- Location: Ireland
Re: Scripting Squad AI
Well this script needs a lot of lot of lot of work
But the backbone of it is there for a good scripter to fix
But the backbone of it is there for a good scripter to fix
He's a Bot Jim, But not as we know It.