Page 1 of 2

Script for Campain

Posted: Sat Mar 17, 2007 9:36 am
by Aquamarin
Hallo!

I try to make a MP-Campain with 7 maps.
The question is - how can i change the rotation inside the script of a map?
I try to explain:
the campain starts at map nr. 4. If team Axis winns, map nr. 5 should be loadet, but if team Allies wins, map nr. 3 should be loadet. The winning-team goes every time to the next map in there own direction.
If some team reach the objective on the last map - for Axis on map nr. 7, and for Allies map nr. 1 - they have won.
So - the script must reach on the server-script, because after any round a new ( different ) map must be loadet.
How can this work?

Thx for your ideas!

Aquamarin

Posted: Tue Mar 20, 2007 2:32 pm
by Devil_Dog
This is probably not the best fix, but...
If it was one BIG map, you could have the objectives change the spawn points. I don't know how to do this, and there is probably a better way, but there where no replies, so...
:lol:
BTW: I like the idea, if you get it to work, please post it here.

mission complete

Posted: Tue Mar 20, 2007 8:25 pm
by tltrude
I don't know if this will work, but you can try it.

leveltransition nextlevelname

By the way, map names are not allowed to have empty spaces. Add these lines under the teamwin lines.

teamwin axis
wait 3
leveltransition nr_5


teamwin allies
wait 3
leveltransition nr_3

Posted: Fri Apr 06, 2007 6:15 am
by Aquamarin
I work this time on a another projekt, but the next will be this.
You become information first! :wink:
THX for your ideas!

Posted: Wed May 09, 2007 12:25 pm
by Aquamarin
So! My work still goes on! :lol:

I try the command you tell me, but it didn?d work...

One of 7 scripts:

Code: Select all

// Camera Test Map
// ARCHITECTURE: TLTRUDE
// SCRIPTING: TLTRUDE

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" ""
		
	level waittill prespawn

	//*** Precache Dm Stuff
	exec global/DMprecache.scr

	level.script = "maps/obj/test_map4.scr"
	exec global/ambient.scr obj_team2
	level.captureteam = "nuetral"
	level.dmrespawning = 0 // 1 or 0
	level.dmroundlimit = 5 // round time limit in minutes
	level.clockside = kills // set to axis, allies, kills, or draw
	thread camera_mover_ax
	thread camera_mover_al


	level waittill spawn

	//level waittill roundstart

end

camera_mover_ax:


	$ax_win_map4 waittill trigger
	local.player = parm.other
	if (local.player.dmteam == "axis")
	{
		iprintln "Axis Team has captured the door!"
		level.captureteam = "axis"

	}
	


	// Who won?

	if (level.captureteam == "axis")
	{
		teamwin axis
	wait 3 
	leveltransition test_map3
	}


end

camera_mover_al:

	$al_win_map4 waittill trigger
	local.player = parm.other
	if (local.player.dmteam == "allies")
	{
		iprintln "Allies Team has captured the door!"
		level.captureteam = "allies"
	}

	if (level.captureteam == "allies")
	{
		teamwin allies
	wait 3 
	leveltransition test_map5
	}

end
I use your camera_test-script... ( GREAT TUT! THX )
I have made 7 small testmaps ( trigger_multiple to walk in ) for check it out. Nope.
I put all bsp?s and scripts in one pk3 - allso Nope.
teamwin = ok, but not the leveltransition....

I have no idea....

PS: --> Devil Dog: i have allready do this in a map - they come soon for public with 3 level?s! :wink: But i want to use 7 BIG maps for the campaign - so the pk3 will have round 200MB if i pack it into one pk3!!! Compiling will go maybe a life long! :lol: I try better another ways for this!

nextmap

Posted: Wed May 09, 2007 3:09 pm
by tltrude
Try "nextmap".

Code: Select all

   if (level.captureteam == "axis") 
   { 
      teamwin axis 
   wait 3 
   nextmap test_map3 
   } 
if that does not work, try switching "teamwin" to the bottom.

Code: Select all

   if (level.captureteam == "axis") 
   { 
   wait 3 
   leveltransition test_map3 // try with nextmap too
      teamwin axis 
   } 

Posted: Wed May 09, 2007 4:45 pm
by Aquamarin
Console say?s:

Code: Select all

	nextmap test_map5 (maps/obj/test_map4.scr, 78)
	^

^~^~^ Script Error: Failed execution of command 'nextmap' for class 'ScriptThread'
The other version has no effect to the console.

Booth versions are failed.... Sry :cry:

Posted: Wed May 09, 2007 6:07 pm
by ViPER
there is a trigger changelevel

Posted: Wed May 09, 2007 7:18 pm
by Aquamarin
Good idea!
But how can i target the trigger to a specified map?
It allways load the first map in the rotation - normaly "The Hunt"...

Posted: Wed May 09, 2007 8:50 pm
by ViPER
you need to set "map" var. if you had two change level triggers in your map they would both point to "map" that is set. so you would need to figure out how the players will change "map" var back and forth.

Ive never done this but knew it was there - let me know how it goes.


******edit

I tried a test with this trigger and couldnt get it to work with "map" var. But it will work with nextmap. the problem with changing nextmap is you will cut the link in the server rotation and the last map will keep repeating.

cvar

Posted: Thu May 10, 2007 1:36 am
by tltrude
"nextmap" is a cvar, so you should be able to set it like this.

Code: Select all

   if (level.captureteam == "axis") 
   { 
   wait 3 
   setcvar "nextmap" "test_map3"
      teamwin axis 
   } 
There is also one that looks like this.

setcvar "sv_maplist" "dm/test_map3"

But I don't know if either of those will automatally start the new map in the rotation.

Posted: Mon Aug 13, 2007 7:42 pm
by Aquamarin
I have find a way - it still works...
Work still in prozess! ;-)

Out of tempmodels

Posted: Thu Sep 20, 2007 4:26 am
by Aquamarin
Work still in prozess...
BUT..
a problem comes over me...
I have make 4 Maps now, and at the last map theres no animation running after compiling...
Qconsole say?s: Out of tempmodels.
All entytis missed...
Allso if i throw a nade, or i cant see another Players on the map...
What can i do, becorse i want to make 7 maps....
The num_vis_bites are 2900000 - it cant be to mutch...

Thanks for help!

Aqua

Posted: Sun Sep 23, 2007 10:27 am
by Aquamarin
Oh my god!
I set the Farplane too high! Thats the reason!
Is there any list of farplanes?
When i made a map, i think theres no farplane on it. Is that right?
But - if i made ( now ) 4 maps, i have to give a farplane in the script, becorse there a different farplanes in any world, and the next map becomes the farplane from the last bevore....
Also - what is the farplane for NO farplane?
Sry 4 my english...

Aqua

PS: thats all matter for "Out of Tempmodels".... What can it be???

Posted: Sun Sep 23, 2007 10:47 am
by bdbodger
PS: thats all matter for "Out of Tempmodels".... What can it be???
Are you using a lot of effects like welding sparks or smoke , things like that use tempmodels and too many effects can put you over the limit . Any kind of emitter will use tempmodels .