Ok, I have some friends (lol) who like to scrash my game
Here is the problematic part - (the entire script is about 950 lines long now)
They keep crashing! And if i set the barneynames when I spawn them, they do not respond to commands Even changing them to level.friendly1 + 2 didnt help
If you are useing the global/friendly.scr then you need to name them all $friendly and give them a key:fnum value:1 to the number of friendlies you have . ie the first one is fnum 1 the second friendly is fnum 2 etc then exec the global/friendly.scr it will make the guy who is fnum 1 level.friendly1 etc etc
Last edited by bdbodger on Thu May 12, 2005 9:49 pm, edited 1 time in total.
One other thing why are you spawning them is this single player or multi ?
For the global/friendly.scr to work right you need a map with pathnodes and some of them need to have the targetname friendlynode or something like that spaced through out the map every so often , ones at the beginning of the map with a low set number and ones at the end of the map with a higher set number . There is lots of info written at the top of the global/friendly.scr . Also the friendly.scr uses commands to follow the player but they won't work very well in multi .
Its single player, and I am making them jump over some sandbags using the wallscale thing... I've fixed the problem by making them run out infront of the halftrack
I see well it is not that hard really all you need to do is make the friendly nodes not spaced too close together and lots of regular nodes . make sure that you give the friendlynodes set numbers starting at 10 and then going up by 10 . Make your ai all with the targetname friendly and the key fnum 1 for the first ai then 2 for the second ai etc etc then
Before level waittill spawn "exec global/friendly.scr".
when you are ready for them to follow you you do like it says in the friendly.scr
// When you want to turn on the friendly AI, do "level.friendly# thread global/friendly.scr::friendlythink".
// Afterwards you can set his friendtype like this: level.friendly#.friendtype = 1.
basically that is it they should work but if you are trying to spawn them then they have to be in the map before you exec the friendly.scr . They should follow you without you haveing to do any more scripting . You might want to set thier min,max,distance and waittime (they determine how close he has to get to nodes before he goes for his next node and how long he waits at each node before following the player).