Page 1 of 1

Problems with moving vehicles

Posted: Mon May 23, 2005 4:36 pm
by (SOS)Sniper
I'm working on getting a truck moving (driving around my map). I'm using the tutorial on this site, and it's not working I think it's something wrong with my .scr.

Here it is...

main:

exec global/ai.scr
exec global/loadout.scr maps/dm/test_truckmove.scr
exec gloal/friendly.scr

level waittill prespawn

exec global/ambient.scr test_truckmove
level waittill spawn
level.script =maps/dmtest_truckmove.scr
thread truck

end

truck:
$trk drive $wap

end

Is there anything wrong with it?

Posted: Mon May 23, 2005 5:06 pm
by Axion
The driving tutorials on this site are for single-player, and it looks like you set up your script for multiplayer instead. If that's the case, and you're building a single-player map, then this script should work:

(Remember that single-player maps shouldn't be placed in the dm folder. Just put them inside your maps folder to test them.)


Code: Select all

main:

level waittill prespawn

exec global/ai.scr
exec gloal/friendly.scr
exec global/loadout.scr maps/test_truckmove.scr
exec global/ambient.scr test_truckmove

level waittill spawn

level.script = maps/test_truckmove.scr
thread truck

end

truck:
$trk drive $wap

end 

Posted: Mon May 23, 2005 5:13 pm
by (SOS)Sniper
I'm trying to get it do work for mulyplayer, that's why I had it in the dm part..Is that the reason why it's not working?

Posted: Mon May 23, 2005 5:32 pm
by Axion
(SOS)Sniper wrote:I'm trying to get it do work for mulyplayer, that's why I had it in the dm part..Is that the reason why it's not working?
It states at the bottom of the tutorial that it was tested in single-player mode only, which explains why nothing would work when you tested it in multiplayer.

Try this script, and let me know how it works for you:

Code: Select all


main:

setcvar "g_obj_alliedtext1" "Test Truck"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none" 

level waittill prespawn
//Precache Dm Stuff

exec global/ambient.scr test_truckmove

level waittill spawn

level.script = maps/dm/test_truckmove.scr
thread truck

end

level waittill roundstart

truck:
$trk drive $wap

end 





Posted: Tue May 24, 2005 3:49 am
by bdbodger
exec gloal/friendly.scr looks like your are missing a b in global