2 Questions

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Personator
Private
Posts: 5
Joined: Fri Mar 21, 2003 11:42 pm

2 Questions

Post by Personator »

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?
User avatar
Butch
Lieutenant Colonel
Posts: 398
Joined: Fri Jan 24, 2003 11:30 am

Post by Butch »

if you look in the level scripts for the game it might help with the squad problem
PFC.Butch
B Company, 2nd Ranger Battalion
US Army
Yarik
General
Posts: 1031
Joined: Thu Jan 09, 2003 7:12 pm
Contact:

Post by Yarik »

I think there are two kinds of Mg42's. A fake one which doesnt fire and one that does.
Skype: Yarik_usa
www.skype.com <---free pc2pc phone
Image
User avatar
Butch
Lieutenant Colonel
Posts: 398
Joined: Fri Jan 24, 2003 11:30 am

Post by Butch »

yeah the one called 'mg42-fake' is fake
PFC.Butch
B Company, 2nd Ranger Battalion
US Army
Personator
Private
Posts: 5
Joined: Fri Mar 21, 2003 11:42 pm

Post by Personator »

None of them are fake. One is MG42 and the other is MG42b. Neither has fakebullets checked.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

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
Post Reply