Page 1 of 2

Plz help me again with my map

Posted: Sat May 17, 2003 8:03 pm
by Alcoholic
hi im planning to make a big map where you follow guys and a medic around the map shooting people and hiding behind walls and etc...

i made a small test map first but it doenst work right...

okay the map is a simple L shaped outdoor area. you spawn with 4 guys and a medic on top of the L. they are supposed to run down the L and turn the corner and encounter some nazis. The problem is, they dont move anywhere ON THEIR OWN. i can push them to the nazis but then it gets even more weird. the medic doesnt do anything, and everyone dies in 2-3 shots. all the americans have 100 hp, and all the nazis have 300 hp, yet i can kill them in a few pistol whips to the leg. heres my scripts below...


Code: Select all


//test_alliedraid

exec global/ai.scr
exec global/loadout.scr maps/test_x.scr
main:
level waittill prespawn
exec global/ambient.scr test_x
level waittill spawn
$player item weapons/colt45.tik
$player item weapons/thompsonsmg.tik
fadein 2 0 0 0 1
wait 2
level.script = "maps/test_x.scr"

Code: Select all


//test_alliedraid_precache

cache items/colt45.tik
cache items/thompsonsmg.tik

plz help me any help would be appreciated. if it involves changing the script plzz comment EVERYTHIGN since im sort of new to this.



PS- oh yeah i also have something else to say. i was reading the global friendly script, and i set the medic to medic behavior (hes #fnum5) and the rest to that offset behavior 0. the nodes i want them to run to start with the first one having #set 10 and the next #set 20 and the next #set 30 and the last #set40. all of them are named "friendlynode" and i also have fighting nodes around the map for example a corner left at the L junction. those have no name.

Posted: Sat May 17, 2003 8:53 pm
by jv_map
Add 'exec global/friendly.scr' below level waittill prespawn.

Posted: Sun May 18, 2003 12:53 am
by Alcoholic
ok heres my new script...

[code]

//test_alliedraid.scr

exec global/friendly.scr
exec global/ai.scr

main:

level waittil prespawn

exec global/friendly.scr
exec global/ai.scr

level waittil spawn

$player items/thompsonsmg.tik
$player items/colt45.tik
$player ammo smg 200
$player ammo pistol 70

level.friendly1 thread
global/friendly.scr::friendlythink

level.friendly2 thread
global/friendly.scr::friendlythink

level.friendly3 thread
global/friendly.scr::friendlythink

level.friendly4 thread
global/friendly.scr::friendlythink

level.friendly5 thread
global/friendly.scr::friendlythink

level.friendly1.friendtype = 0
level.friendly2.friendtype = 0
level.friendly3.friendtype = 0
level.friendly4.friendtype = 0
level.friendly5.friendtype = 5

level.friendly1.avoidplayer = 0
level.friendly2.avoidplayer = 0
level.friendly3.avoidplayer = 0
level.friendly4.avoidplayer = 0
level.friendly5.avoidplayer = 0

level.friendly1.mins = 20
level.friendly1.maxs = 40

level.friendly2.mins = 20
level.friendly2.maxs = 40

level.friendly3.mins = 20
level.friendly3.maxs = 40

level.friendly4.mins = 20
level.friendly4.maxs = 40

level.friendly5.mins = 20
level.friendly5.maxs = 40

level.friendly1.health = 500
level.friendly2.health = 500
level.friendly3.health = 500
level.friendly4.health = 500
level.friendly5.health = 500

[/code]


i started it up, they still die really fast, they dont run to the other end of the map, even after they kill everyone. the medic does nothing, i had 40 hp he ddint heal me. i dont know if the error is in the script or somewhere else, so i put a zip file of my .map and .scr files on a website. i hope you can download it really quick and check the map out and see if you find anything wrong. this is really stumping me and i wish i knew what was wrong!

anyways here is the link. copy and paste it in your browser.

www.geocities.com/cool_kirby77/test_alliedraid.zip

Posted: Sun May 18, 2003 2:46 am
by Alcoholic
come back jv i really need your help plz.

Posted: Sun May 18, 2003 3:14 am
by mohaa_rox
Make sure you have ur friendlies like this:

targetname:friendly
#fnum:1

targetname:friendly
#fnum:2

and so on, where #fnum:x is the number behind your friendly, like:

targetname:friendly
#fnum:1

IS: level.friendly1

so:

level.friendly1 thread global/friendly.scr::friendlythink

then your code, such as

level.friendly1.distance = xxx
level.friendly1.destination = $player
level.friendly1.friendtype = x

Posted: Sun May 18, 2003 3:15 am
by mohaa_rox
Do u set up pathnodes?

Posted: Sun May 18, 2003 5:44 am
by Alcoholic
yeah they are named friendlynode and the first one has #set 10 and the rest go up by 10 and the last is #set40. i did put #fnum on all of them. #fnum 5 is the medic.

Posted: Sun May 18, 2003 6:10 am
by jv_map
Type waittill with two l's and remove the first the exec global/friendly.scr (above prespawn). :)

Posted: Sun May 18, 2003 8:14 am
by bdbodger
I read in the SDK that pathnodes need to be 360 units apart or less . You can use the ruler in mohradiant to check if they are too far apart as well .

Posted: Sun May 18, 2003 9:19 am
by Alcoholic
ok i made some progress...

the pathnodes had a #targetname rather than a $targetname :lol:


i fixed that but they still wouldnt budge... but i thought of an idea.

all of teh nodes are named friendlynode so i gave the captain a target of "friendlynode" and wala he ran through all the nodes. to make the squadmates follow, i gave the captain an alias of level.captain, and the squadmates destination is level.captain. the medic supposedly always stays with squadmates, so i didnt give him any destination. i tried it out, and the captain ran into the open and started shooting nazis while teh rest of the squad followed. i went down to 30 hp but medic did nothing! all he did was stand there looking goofy. after all the nazis were dead and the captain marched on, the medic started following, but he never did any healing!!!! heres my new script btw...

Code: Select all


main:

level waittill prespawn

exec global/friendly.scr
exec global/ai.scr
exec global/loadout.scr maps/test_alliedraid.scr

level.captain = level.friendly1

level waittill spawn

	$player item weapons/thompsonsmg.tik
	$player item weapons/colt45.tik
	$player ammo smg 210
	$player ammo pistol 70
	$player useweaponclass smg
	$player item weapons/m2frag_grenade
	$player ammo grenades 2
	
thread friendlysetup
end

friendlysetup:

	level.friendly1 thread global/friendly.scr::friendlythink
	level.friendly2 thread global/friendly.scr::friendlythink
	level.friendly3 thread global/friendly.scr::friendlythink
	level.friendly4 thread global/friendly.scr::friendlythink
	level.friendly5 thread global/friendly.scr::friendlythink

	level.friendly1.friendtype = 0
	level.friendly2.friendtype = 0
	level.friendly3.friendtype = 0
	level.friendly4.friendtype = 0
	level.friendly5.friendtype = 5

	level.friendly1.avoidplayer = 1
	level.friendly2.avoidplayer = 1
	level.friendly3.avoidplayer = 1
	level.friendly4.avoidplayer = 1
	level.friendly5.avoidplayer = 1

	level.friendly1.mins = 64
	level.friendly1.maxs = 512

	level.friendly2.mins = 128
	level.friendly2.maxs = 512

	level.friendly3.mins = 128
	level.friendly3.maxs = 512

	level.friendly4.mins = 128
	level.friendly4.maxs = 512

	level.friendly1.health = 400
	level.friendly2.health = 400
	level.friendly3.health = 400
	level.friendly4.health = 400
	level.friendly5.health = 400
	
	level.friendly2.destination = level.captain
	level.friendly3.destination = level.captain
	level.friendly4.destination = level.captain
	
	level.friendly1.distance = 128
	level.friendly2.distance = 128
	level.friendly3.distance = 128
	level.friendly4.distance = 128

end

i got the format for doing this thread stuff after looking at this map named test_douvres.

Posted: Sun May 18, 2003 9:25 am
by mohaa_rox
WHy do u need pathnodes with targetnames?

Posted: Sun May 18, 2003 9:26 am
by Alcoholic
somewhere in the friendly script it said give them a name of friendlynode.

Posted: Sun May 18, 2003 9:26 am
by Alcoholic
why doesnt my medic heal??? i solved most all of the problems i had.

Posted: Sun May 18, 2003 9:28 am
by mohaa_rox
Normally my medic doesn't heal too.

Posted: Sun May 18, 2003 9:29 am
by Alcoholic
whats wrong with them?