1 level 2 possible endings.

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
williewisp
First Lieutenant
Posts: 208
Joined: Fri May 16, 2003 1:10 pm
Location: ireland

1 level 2 possible endings.

Post by williewisp »

is it possible 2 have it so depending on how you finish a level it would depend on what level it would load next.
eg. 2 exits for a level, depending on which one you go to, it would would then load a different level (1 level, 2 endings#

///////
would two seperate triggers work, depending on which one the player goes to, load a level, code(have no idea)


any1?????
it's not a time for thinking its a time for drinking!
Serph
Major
Posts: 278
Joined: Wed Jun 11, 2003 5:23 pm
Location: Barrie, Ontario Canada
Contact:

Post by Serph »

It should work in sp I think...
Image
~serph~
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

You could use $player stufftext

example:

thread1:
$player stufftext "spmap map2"
end

thread2:
$player stufftext "spmap map3"
end

or bsptransition( String next_map )


Transitions to the next BSP. Keeps player data, and game data.

example:
bsptransition "mymap"
end

then use setthread for the triggers
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

yeah it should. thats what they did in mission 5, the day of the tiger. if you rescue all the guys from the first level, they are all there in the second.
User avatar
williewisp
First Lieutenant
Posts: 208
Joined: Fri May 16, 2003 1:10 pm
Location: ireland

Post by williewisp »

so that codes holds the data for how many weapons you finished wit and the gamedata, ya, but to call another level once fin.


i not sure on some of this

in the entity box
trigger 1, setthread level1a
trigger 2,setthread level1b

script
level1a:
wait 5
exec global/missioncomplete.scr "mapname"
(how do i call the next level?)
end

level1b:
(same as above)

end
it's not a time for thinking its a time for drinking!
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

in the missioncomplete.scr
main local.nextlevel local.bsp:
if ($player.health <= 0)
pause

$player stopwatch 0
if (local.nextlevel != NIL)
{
if (local.bsp != NIL)
{
game.loadout = false
bsptransition local.nextlevel
}
else
{
game.loadout = NIL
leveltransition local.nextlevel
}
}

end
exec global/missioncomplete.scr "mapname" will start the next level and
exec global/missioncomplete.scr "mapname" "map2" will start the next map the difference is bsptransition and leveltransition the stufftext method is the same as calling a new map in the maplist .
LT.BARNES
Major
Posts: 288
Joined: Mon Dec 30, 2002 4:37 pm
Location: london

Post by LT.BARNES »

this can def be done.

i mean you can set 2 ending triggers which are in diff places and when u go through them the level will end.
...prepare for your finest hour...
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post by nuggets »

have in the main thread
level.objective_done = 0
level.total_objectives = * //replace * with all the objectives

have in all of your objectives
level.objective_done++
thread end_check

then at a trigger mulitple where the end is, have
key: setthread
value: end_check_1 and end_check_2 respective

and then
end_check_1:
if (level.objective_done == level.total_objectives)
{leveltransition map1} //replace map1 with 1st map to move to
end

end_check_2:
if (level.objective_done == level.total_objectives)
{leveltransition map2} //replace map2 with 2nd map to move to
end
hope this helps, prob not cos it's all foreign 2 me :-/
User avatar
williewisp
First Lieutenant
Posts: 208
Joined: Fri May 16, 2003 1:10 pm
Location: ireland

Post by williewisp »

thanks for that :wink:
it's not a time for thinking its a time for drinking!
User avatar
Alcoholic
General
Posts: 1470
Joined: Sat May 17, 2003 5:57 am
Location: California
Contact:

Post by Alcoholic »

actually, you know what, i dont think for m5l1a, they used different levels. it was rather, a game. variable that they saved, so in the next level, they knew how many ai to spawn. incase you dont know, anything you assign to a game. object will stay persistent across levels. for example, at the end of mission a, you can create a game object "game.hp = $aiguy.health" then in mission b, you can call the game object "println ("aiguy's health last level was " + game.hp)"
Post Reply