2 Questions
Moderator: Moderators
-
Personator
- Private
- Posts: 5
- Joined: Fri Mar 21, 2003 11:42 pm
2 Questions
I finally got an MG to work, but now i've run into 2 new problems. First, how can you have more than 1 MG in a map? I made a second one named MG42b with an equivalent scr line, but it won't fire. The other problem is getting Squad members to follow me. I know it involves the script, but i dont know how. Any help?
-
Personator
- Private
- Posts: 5
- Joined: Fri Mar 21, 2003 11:42 pm
to use friendlies you need to do a few things in your map and script
if you open pak0.pk3 in mohaa or pak1.pk3 in spearhead and go to the global directory and open the frienldy.scr it lets you know at the top of the script how to setup friendlies . basicaly it is this . You make some friendly ai's give them a targetname of friendly. give the first one a key of #fnum and a value 1 . the second one a key of #fnum and a value 2 etc each one a different fnum .
in the script at the top
exec global/friendly.scr
farther down when you want to start the friendy behavour
for (local.i=1;local.i < $friendly.size+1 ;local.i++)
{
if (isalive $friendly[local.i] )
{
$friendly[local.i] thread global/friendly.scr::friendlythink
$friendly[local.i].friendtype = 0 // Offset Behavior
$friendly[local.i].mins = 30
$friendly[local.i].maxs = 60
}
}
and later
level.friendly1.friendtype = 1 // type 1 Barney Behavior
you can use level.friendly1 that is a $friendly with #fnum 1
there is more to it you need to setup pathnodes for certain types of behavour I suggest you read the friendly script
if you open pak0.pk3 in mohaa or pak1.pk3 in spearhead and go to the global directory and open the frienldy.scr it lets you know at the top of the script how to setup friendlies . basicaly it is this . You make some friendly ai's give them a targetname of friendly. give the first one a key of #fnum and a value 1 . the second one a key of #fnum and a value 2 etc each one a different fnum .
in the script at the top
exec global/friendly.scr
farther down when you want to start the friendy behavour
for (local.i=1;local.i < $friendly.size+1 ;local.i++)
{
if (isalive $friendly[local.i] )
{
$friendly[local.i] thread global/friendly.scr::friendlythink
$friendly[local.i].friendtype = 0 // Offset Behavior
$friendly[local.i].mins = 30
$friendly[local.i].maxs = 60
}
}
and later
level.friendly1.friendtype = 1 // type 1 Barney Behavior
you can use level.friendly1 that is a $friendly with #fnum 1
there is more to it you need to setup pathnodes for certain types of behavour I suggest you read the friendly script
