conditional changelevel Created 17 years ago2007-09-05 13:03:08 UTC by edman747 edman747

Created 17 years ago2007-09-05 13:03:08 UTC by edman747 edman747

Posted 17 years ago2007-09-05 13:03:08 UTC Post #233537
hello all,
am hacking around with the original half-life maps. would like to make them more multi player friendly, for use in svencoop. one problem with any single player map(converted to co-op) is that they change to fast. someone always runs to the end. and vola, changelevel. a possible solution is to include other objectives that must be completed before the changelevel can be activated.

started with the original half-life map c1a1.
have added a trigger_counter entity and attached it to each monster that I want to count. when a monster dies the counter is incremented.

this is great. but if the counter targets the changelevel then the map changes as soon as the count is reached.

would like to make a dynamic or conditional changelevel which is dependent on the completion of other objectives. walk to the changelevel prior to killing all monsters and nothing happens. kill all monsters, the changelevel is armed and can be triggered.

modified c1a1 including a trigger_transition with the same name as the info_landmark. now a player must be in the zone defined by the landmark. kind of tricky cause the zone is very small. this works in half-life, stand in the zone kill the last monster, yea! If not in the zone map will never change and it does not work the same way in svencoop.

any idea what entities I would use to do this?
don't really understand the changetarget property of the trigger_changelevel entity. what does it do? how is it used?

have looked at adding a multisource which targets the changelevel, not sure what entities could be used to fire the multisource it.

guess I could put a box in the doorway where the changelevel is and when someone breaks the box and all monsters are dead then...
what if someone breaks the box first. no that won't work.

suggestions?

thanks,

converted to coop:
add a few info_player_deathmatch spawns and extra monsters.
Posted 17 years ago2007-09-05 15:25:07 UTC Post #233546
Too long post! Sum it up.
Posted 17 years ago2007-09-05 15:30:45 UTC Post #233547
Have your counter target the multisource. Now set the "master" value of the change level to the name of the multisource

When the counter triggers the multisource it will enable the change level.
Posted 17 years ago2007-09-05 16:12:51 UTC Post #233550
So, what's the question?
Posted 17 years ago2007-09-06 14:23:33 UTC Post #233590
1. trigger_changelevel does not have a master value or property.
so how does that work?
2. would like for the monster_counter to arm the trigger_changelevel then require a player to fire the trigger_changelevel
Posted 17 years ago2007-09-06 14:28:44 UTC Post #233591
I thought the change level did... Don't change levels change the level when triggered as well as when people walk into them?

IF they are then move the change level somewhere the player cannot reach. Now use a trigger_once to fire the change level once the trigger is active.
Posted 17 years ago2007-09-06 15:12:55 UTC Post #233598
setting spawnflags 2 means changelevel can be only triggered by an event.

note: cannot add brush based entities. using ripent.
Posted 17 years ago2007-09-06 16:12:05 UTC Post #233603
or just have 2 separate endings to the level.
say, 2 cages where when you hit a button youre trapped in, but the other player hits his button and shuts his cage AND loads next level. Cage opens, and viola
Tetsu0 Tetsu0Positive Chaos
Posted 17 years ago2007-09-06 16:43:28 UTC Post #233604
Or just you know, keep it simple and screw the complicated stuff?
Posted 17 years ago2007-09-06 16:58:52 UTC Post #233605
But if he did that he might as well stick with whats there.
Posted 17 years ago2007-09-06 20:30:35 UTC Post #233613
considered using one of the existing doors targeted by the monster_counter. the doors appear to be broken in the open position. but they are not even doors!

two cages sounds fun. although it really gets further and further away from the original half-life storyline.
Posted 17 years ago2007-09-07 10:39:05 UTC Post #233627
thanks everyone, this works:

map c1a1 modified for svencoop.
one player runs ahead leaving his teammates to fight all the monsters. he reaches the changelevel... nothing happens.

his teamates kill most all of the monsters. again no change.

Then a player walks to where the changelevel was in the original half-life map

add two lines to every monster I want to count:

"TriggerTarget" "monstercounter"
"TriggerCondition" "4"

append these lines to the end of the ent file.
copy the trigger_changelevel. make the copy into a trigger_once.

{
"targetname" "monstercounter"
"target" "alldead_tr"
"count" "3"
"classname" "trigger_counter"
}{
"targetname" "alldead_tr"
"target" "alldead_ms"
"triggerstate" "2"
"classname" "trigger_relay"
}{
"targetname" "alldead_ms"
"classname" "multisource"
}{
"model" "*4"
"classname" "trigger_once"
"target" "alldead_cl"
"master" "alldead_ms"
}{
"model" "*4"
"landmark" "c1a1"
"map" "c1a1a"
"targetname" "alldead_cl"
"spawnflags" "3"
"classname" "trigger_changelevel"
}
You must be logged in to post a response.