stalimodded

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
killbry
Private
Posts: 8
Joined: Fri Jun 16, 2006 12:39 am

stalimodded

Post by killbry »

i scripted a map this is what i did and it doesnt work on my machine and im so close to doing this

First i copied all files from pak5.pk3 to mohaa/main/maps/dm

then i edited the mohdm6.src to the following

Code: Select all

// STALINGRAD
// ARCHITECTURE: ZIED, POWZER
// SCRIPTING: POWZER

main:

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

setcvar "g_scoreboardpic" "mohdm6"

	// call additional stuff for playing this map round based is needed
	if(level.roundbased)
		thread roundbasedthread

	level waittill prespawn
	
	//*** Precache Dm Stuff
	exec global/DMprecache.scr

	exec global/door_locked.scr::lock
	level.script = maps/dm/mohdm6.scr
	exec global/ambient.scr mohdm6

	exec maps/dm/fix1.scr

	level waittill spawn

end

//-----------------------------------------------------------------------------

roundbasedthread:

	// Can specify different scoreboard messages for round based games here.

	level waitTill prespawn

	level waittill spawn

	// set the parameters for this round based match
	level.dmrespawning = 0 // 1 or 0
	level.dmroundlimit = 5 // round time limit in minutes
	level.clockside = kills // set to axis, allies, kills, or draw

	level waittill roundstart

end
then i made fix1.src in mohaa/main/maps/dm/
then edited to this

Code: Select all

local.fix1 = spawn script_model

local.fix1 model "static/nazi_crate.tik"

local.fix1.origin = ( -159.97 370.08 520.01 )

local.fix1.angles = ( 0 0 0 )

local.fix1.scale = 1.0

local.fix2 = spawn script_model

local.fix2 model "static/nazi_crate.tik"

local.fix2.origin = ( -162.52 281.58 520.01 )

local.fix2.angles = ( 0 0 0 )

local.fix2.scale = 1.0

local.fix3 = spawn script_model

local.fix3 model "static/nazi_crate.tik"

local.fix3.origin = ( -165.58 165.49 520.01 )

local.fix3.angles = ( 0 0 0 )

local.fix3.scale = 1.0

local.fix4 = spawn script_model

local.fix4 model "static/nazi_crate.tik"

local.fix4.origin = ( -167.81 81.16 520.01 )

local.fix4.angles = ( 0 0 0 )

local.fix4.scale = 1.0

local.fix5 = spawn script_model

local.fix5 model "static/nazi_crate.tik"

local.fix5.origin = ( -171.30 -51.43 520.01 )

local.fix5.angles = ( 0 0 0 )

local.fix5.scale = 1.0

local.fix6 = spawn script_model

local.fix6 model "static/nazi_crate.tik"

local.fix6.origin = ( -177.27 -180.00 520.01 )

local.fix6.angles = ( 0 0 0 )

local.fix6.scale = 1.0

local.fix7 = spawn script_model

local.fix7 model "emitters/firesmoke.tik"

local.fix7.origin = ( -279.93 43.84 -145.24 )

local.fix7.angles = ( 0 0 0 )

local.fix7.scale = 1.0

local.fix8 = spawn script_model

local.fix8 model "static/vehicle_bmwbike.tik"

local.fix8.origin = ( -604.77 -385.15 32.13 )

local.fix8.angles = ( 0 0 0 )

local.fix8.scale = 1.0

shouldnt this spawn some stuff on map it doesnt
i looked where the stuff spawns and did the Coord command and fount the coord on the items what am i doing wrong
any help will be appreciated
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Shouldnt need all the files from the pak5.pk3, Just the .scr
main://<---might need this
local.fix1 = spawn script_model

local.fix1 model "static/nazi_crate.tik"

local.fix1.origin = ( -159.97 370.08 520.01 )

local.fix1.angles = ( 0 0 0 )

local.fix1.scale = 1.0

local.fix2 = spawn script_model

local.fix2 model "static/nazi_crate.tik"

local.fix2.origin = ( -162.52 281.58 520.01 )

local.fix2.angles = ( 0 0 0 )

local.fix2.scale = 1.0

local.fix3 = spawn script_model

local.fix3 model "static/nazi_crate.tik"

local.fix3.origin = ( -165.58 165.49 520.01 )

local.fix3.angles = ( 0 0 0 )

local.fix3.scale = 1.0

local.fix4 = spawn script_model

local.fix4 model "static/nazi_crate.tik"

local.fix4.origin = ( -167.81 81.16 520.01 )

local.fix4.angles = ( 0 0 0 )

local.fix4.scale = 1.0

local.fix5 = spawn script_model

local.fix5 model "static/nazi_crate.tik"

local.fix5.origin = ( -171.30 -51.43 520.01 )

local.fix5.angles = ( 0 0 0 )

local.fix5.scale = 1.0

local.fix6 = spawn script_model

local.fix6 model "static/nazi_crate.tik"

local.fix6.origin = ( -177.27 -180.00 520.01 )

local.fix6.angles = ( 0 0 0 )

local.fix6.scale = 1.0

local.fix7 = spawn script_model

local.fix7 model "emitters/firesmoke.tik"

local.fix7.origin = ( -279.93 43.84 -145.24 )

local.fix7.angles = ( 0 0 0 )

local.fix7.scale = 1.0

local.fix8 = spawn script_model

local.fix8 model "static/vehicle_bmwbike.tik"

local.fix8.origin = ( -604.77 -385.15 32.13 )

local.fix8.angles = ( 0 0 0 )

local.fix8.scale = 1.0
end//<--And might need this
Last edited by Green Beret on Fri Jun 16, 2006 4:22 am, edited 1 time in total.
Image
killbry
Private
Posts: 8
Joined: Fri Jun 16, 2006 12:39 am

Post by killbry »

wow bro thanks
killbry
Private
Posts: 8
Joined: Fri Jun 16, 2006 12:39 am

Post by killbry »

nope still didnt work but i changed the code alittle bit while i was waiting for a response

to make sure this is right this is my mohdm6.src which is in main/maps/dm

Code: Select all

// STALINGRAD
// ARCHITECTURE: ZIED, POWZER
// SCRIPTING: POWZER

main:

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

setcvar "g_scoreboardpic" "mohdm6"

	// call additional stuff for playing this map round based is needed
	if(level.roundbased)
		thread roundbasedthread

	level waittill prespawn
	
	//*** Precache Dm Stuff
	exec global/DMprecache.scr

	exec global/door_locked.scr::lock
	level.script = maps/dm/mohdm6.scr
	exec global/ambient.scr mohdm6

	exec maps/dm/fix1.scr

	level waittill spawn

end

//-----------------------------------------------------------------------------

roundbasedthread:

	// Can specify different scoreboard messages for round based games here.

	level waitTill prespawn

	level waittill spawn

	// set the parameters for this round based match
	level.dmrespawning = 0 // 1 or 0
	level.dmroundlimit = 5 // round time limit in minutes
	level.clockside = kills // set to axis, allies, kills, or draw

	level waittill roundstart

end
then this is fix1.src which is in main/maps/dm

Code: Select all

main:

local.fix1 = spawn script_model

local.fix1 model "static/nazi_crate.tik"

local.fix1.origin = ( -136.00 400.00 560.00)

local.fix1.angles = ( 0 0 0)

local.fix1.scale = 1.0

local.fix2 = spawn script_model

local.fix2 model "static/nazi_crate.tik"

local.fix2.origin = ( -136.00 344.00 560.00)

local.fix2.angles = ( 0 0 0)

local.fix2.scale = 1.0

local.fix3 = spawn script_model

local.fix3 model "static/nazi_crate.tik"

local.fix3.origin = ( -136.00 288.00 560.00)

local.fix3.angles = ( 0 0 0)

local.fix3.scale = 1.0

local.fix4 = spawn script_model

local.fix4 model "static/nazi_crate.tik"

local.fix4.origin = ( -136.00 232.00 560.00)

local.fix4.angles = ( 0 0 0)

local.fix4.scale = 1.0

local.fix5 = spawn script_model

local.fix5 model "static/nazi_crate.tik"

local.fix5.origin = ( -136.00 176.00 560.00)

local.fix5.angles = ( 0 0 0)

local.fix5.scale = 1.0

local.fix6 = spawn script_model

local.fix6 model "static/nazi_crate.tik"

local.fix6.origin = ( -136.00 120.00 560.00)

local.fix6.angles = ( 0 0 0)

local.fix6.scale = 1.0

local.fix7 = spawn script_model

local.fix7 model "static/nazi_crate.tik"

local.fix7.origin = ( -136.00 64.00 560.00)

local.fix7.angles = ( 0 0 0 )

local.fix7.scale = 1.0

local.fix8 = spawn script_model

local.fix8 model "static/nazi_crate.tik"

local.fix8.origin = ( -136.00 8.00 560.00)

local.fix8.angles = ( 0 0 0)

local.fix8.scale = 1.0

local.fix9 = spawn script_model

local.fix9 model "static/nazi_crate.tik"

local.fix9.origin = ( -136.00 -48.00 560.00)

local.fix9.angles = ( 0 0 0 )

local.fix9.scale = 1.0

local.fix10 = spawn script_model

local.fix10 model "static/nazi_crate.tik"

local.fix10.origin = ( -136.00 -104.00 560.00)

local.fix10.angles = ( 0 0 0 )

local.fix10.scale = 1.0

local.fix11 = spawn script_model

local.fix11 model "static/nazi_crate.tik"

local.fix11.origin = ( -136.00 -160.00 560.00)

local.fix11.angles = ( 0 0 0 )

local.fix11.scale = 1.0

local.fix12 = spawn script_model

local.fix12 model "static/nazi_crate.tik"

local.fix12.origin = ( -136.00 -216.00 560.00)

local.fix12.angles = ( 0 0 0 )

local.fix12.scale = 1.0

local.fix13 = spawn script_model

local.fix13 model "static/nazi_crate.tik"

local.fix13.origin = ( -136.00 -272.00 560.00)

local.fix13.angles = ( 0 0 0 )

local.fix13.scale = 1.0

local.fix14 = spawn script_model

local.fix14 model "emitters/firesmoke.tik"

local.fix14.origin = ( -279.93 43.84 -145.24)

local.fix14.angles = ( 0 0 0 )

local.fix14.scale = 1.0

local.fix14 notsolid

end

there is the code now but it still wont work pees me off
[/code]
neillomax
Lieutenant General
Posts: 880
Joined: Thu Jun 23, 2005 6:57 am

Post by neillomax »

Here's the beginning of an old script. Copy and paste. Make it into a pk3 file and put it in your main folder. Load game and see if it's there.

And for crying out loud, stop seperating the lines so much. Makes it difficult to read.


// STALINGRAD
// ARCHITECTURE: ZIED, POWZER
// SCRIPTING: POWZER

main:

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

setcvar "g_scoreboardpic" "mohdm6"
exec maps/dm/fix1.scr

local.fix1 = spawn script_model
local.fix1 model static/indycrate.tik
local.fix1.origin = ( -159.97 370.08 520.01 )
local.fix1.angles = ( 0 0 0 )
local.fix1.scale = 1.0
local.fix1 solid
local.fix1 nodamage
local.fix1 immune bullet
local.fix1 immune fast_bullet
local.fix1 immune bash
local.fix1 immune mg
local.fix1 immune grenade
local.fix1 immune explosion
killbry
Private
Posts: 8
Joined: Fri Jun 16, 2006 12:39 am

Post by killbry »

thanks i found out that i put the objects right in to mohdm6.src i was putting it in a fix1.src file as said in blazinmohaa
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Yea, You can call it from another .scr, But i think it has to be in the global folder instead of maps/dm/fix1.scr
Should be in global/fix1.scr???
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Doesn't matter.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Rookie One.pl wrote:Doesn't matter.
So does -->exec maps/dm/fix1.scr
Go under level waittill spawn?
Or does it matter were its called from in the .scr?
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

When I said it doesn't matter I said it doesn't matter where you put the file, not where you execute it. ;)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Yea, I was wondering were it should be executed for general purposes, Sorry for not being to clear :oops:
Image
killbry
Private
Posts: 8
Joined: Fri Jun 16, 2006 12:39 am

Post by killbry »

where would it be executed im not sure
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

All you do is spawning some objects, so the best place to execute it is after level waittill spawn. :)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
killbry
Private
Posts: 8
Joined: Fri Jun 16, 2006 12:39 am

Post by killbry »

thanks bro i made a really cool mod from this info and medal of honor mapping thanks everybody
Post Reply