Pls tell me why this scrip dosn't work

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Classic
Corporal
Posts: 39
Joined: Thu Dec 08, 2005 8:24 pm
Location: Some where in GA
Contact:

Pls tell me why this scrip dosn't work

Post by Classic »

// ShipBattle
// ARCHITECTURE: Classic
// SCRIPTING: Classic

main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none" // your score board picture

level waittill prespawn

exec global/DMprecache.scr

exec global/ambient.scr yourmapname
// may want to make your own ambient sounds, read the tut

level.script = "maps/dm/yourmapname.scr"
// remember to put in your map name

level waittill spawn

end

//----------------------------------------->
// My Crane
//----------------------------------------->

crane#mover: // my script object is named elevator

waitthread elevator#up
wait 2.5
waitthread elevator#down
goto crane#mover

end

elevator#up:

$elevator moveup 1400

end

elevator#down:

$elevator movedown 1400

end

And does the scr need to be in a pk3 to work or can I put it in the norml dm folder.
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

What's the name of your map?

in the scr - replace "yourmapname" with the name of your map and put it in a pk3.
Classic
Corporal
Posts: 39
Joined: Thu Dec 08, 2005 8:24 pm
Location: Some where in GA
Contact:

Post by Classic »

here is the new .scr and it dosn't work either

// shipbattle
// ARCHITECTURE: Classic
// SCRIPTING: Classic

main:

// set scoreboard messages
setcvar "g_obj_alliedtext1" ""
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""

setcvar "g_scoreboardpic" "none" // your score board picture

level waittill prespawn

exec global/DMprecache.scr

exec global/death_water.scr::deathwater_setup

exec global/ambient.scr shipbattle
// may want to make your own ambient sounds, read the tut

level.script = "maps/dm/shipbattle.scr"
// remember to put in your map name

level waittill spawn

end

//----------------------------------------->
// My Crane
//----------------------------------------->

crane#mover:

waitthread elevator#up
wait 2.5
waitthread elevator#down
goto crane#mover

end

elevator#up:

$elevator moveup 1400

end

elevator#down:

$elevator movedown 1400

end
LiquorKraZy
Captain
Posts: 267
Joined: Tue Aug 10, 2004 5:38 am
Location: CA
Contact:

Post by LiquorKraZy »

try this...add the following:

thread crane#mover

after level waitill spawn and before 'end'

Code: Select all

// shipbattle 
// ARCHITECTURE: Classic 
// SCRIPTING: Classic 

main: 

// set scoreboard messages 
setcvar "g_obj_alliedtext1" "" 
setcvar "g_obj_alliedtext2" "" 
setcvar "g_obj_alliedtext3" "" 
setcvar "g_obj_axistext1" "" 
setcvar "g_obj_axistext2" "" 
setcvar "g_obj_axistext3" "" 

setcvar "g_scoreboardpic" "none" // your score board picture 

level waittill prespawn 

exec global/DMprecache.scr 

exec global/death_water.scr::deathwater_setup 

exec global/ambient.scr shipbattle 
// may want to make your own ambient sounds, read the tut 

level.script = "maps/dm/shipbattle.scr" 
// remember to put in your map name 

level waittill spawn 

thread crane#mover

end 

//-----------------------------------------> 
// My Crane 
//-----------------------------------------> 

crane#mover: 

waitthread elevator#up 
wait 2.5 
waitthread elevator#down 
goto crane#mover 

end 

elevator#up: 

$elevator moveup 1400 

end 

elevator#down: 

$elevator movedown 1400 

end
Post Reply