Script for Campain
Moderator: Moderators
Script for Campain
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
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
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...

BTW: I like the idea, if you get it to work, please post it here.
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...
BTW: I like the idea, if you get it to work, please post it here.
Computers hate me!!!!!
mission complete
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
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
So! My work still goes on!
I try the command you tell me, but it didn?d work...
One of 7 scripts:
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!
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!
I try better another ways for this!
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
}
endI 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!
nextmap
Try "nextmap".
if that does not work, try switching "teamwin" to the bottom.
Code: Select all
if (level.captureteam == "axis")
{
teamwin axis
wait 3
nextmap test_map3
}
Code: Select all
if (level.captureteam == "axis")
{
wait 3
leveltransition test_map3 // try with nextmap too
teamwin axis
}
Console say?s:
The other version has no effect to the console.
Booth versions are failed.... Sry
Code: Select all
nextmap test_map5 (maps/obj/test_map4.scr, 78)
^
^~^~^ Script Error: Failed execution of command 'nextmap' for class 'ScriptThread'Booth versions are failed.... Sry
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.
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
"nextmap" is a cvar, so you should be able to set it like this.
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.
Code: Select all
if (level.captureteam == "axis")
{
wait 3
setcvar "nextmap" "test_map3"
teamwin axis
}
setcvar "sv_maplist" "dm/test_map3"
But I don't know if either of those will automatally start the new map in the rotation.
Out of tempmodels
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
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
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???
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???


