Page 1 of 1
How to make a "win condition"?
Posted: Tue Dec 11, 2012 4:04 pm
by Lollipop
Hi and thank you on forehand.
I want to make some sort of win condition, doesnt matter if its made with either ACS or DECORATE, or made of a combination of both.
I want to make a teamgame. With respawning activated.
There is supposed to be a single player on the one team, and the rest on the other team. Making a balance system is not the goal of this ATM.
The forever alone guy should win if a monster crosses a specific linedeff, and i therefore suppose that the line should use:
80: script execute
the others should win if he dies, but tis not really that much of some specialty when he respawns...
1. how to make a team win if an ACS script is called.
2. how to make a team win if a player dies.
I messed stuf up.. again... no1 will understand that suff^...
oh well... >.<
RE: How to make a "win condition"?
Posted: Tue Dec 11, 2012 5:01 pm
by Ænima
while (condition == false) // "condition" can be anything.
{
delay(5);
}
// make whatever team win
RE: How to make a "win condition"?
Posted: Tue Dec 11, 2012 5:02 pm
by Lollipop
well, the condition isnt the problem, the winning thing is the problem :'(
RE: How to make a "win condition"?
Posted: Tue Dec 11, 2012 5:07 pm
by Qent
RE: How to make a "win condition"?
Posted: Tue Dec 11, 2012 5:08 pm
by Lollipop
Thank you, I dont have time time right now, but ill try it tomorrow if i can :)
RE: How to make a "win condition"?
Posted: Tue Dec 11, 2012 6:13 pm
by Cruduxy
Is it possible to use gamemode lump to limit a team in player numbers?
RE: How to make a "win condition"?
Posted: Tue Dec 11, 2012 6:41 pm
by Qent
No, you need some ACS for that AFAIK.
RE: How to make a "win condition"?
Posted: Thu Dec 13, 2012 2:51 pm
by Lollipop
how do i make a player activate an ACS script then he dies? I really need to know that, the one team is supposed to win by killing the other guy :V
RE: How to make a "win condition"?
Posted: Thu Dec 13, 2012 3:38 pm
by Ænima
Two ways. You can either use a DEATH script or an ENTER script that constantly checks if the player's health and gives a winning point to the other team when his health reaches zero.
RE: How to make a "win condition"?
Posted: Thu Dec 13, 2012 4:58 pm
by Lollipop
hmm, a DEATH script sounds ideal, but how to make it activate on only one players death?
example:
team 1 wants to win by killing him
team 2 player dont want to die
team 1 is supposed to kill him
team 2 player needs to kill them, else they will get him
team 1 player dies
death script is called
team 1 wins
^ that is my idea of what will happen if its not targeted in any way...
RE: How to make a "win condition"?
Posted: Thu Dec 13, 2012 5:05 pm
by one_Two
Lollipop wrote:
hmm, a DEATH script sounds ideal, but how to make it activate on only one players death?
example:
team 1 wants to win by killing him
team 2 player dont want to die
team 1 is supposed to kill him
team 2 player needs to kill them, else they will get him
team 1 player dies
death script is called
team 1 wins
^ that is my idea of what will happen if its not targeted in any way...
Well the script type death only activates for that player that dies.
http://zdoom.org/wiki/Script_types
RE: How to make a "win condition"?
Posted: Thu Dec 13, 2012 5:32 pm
by Ænima
Is this some sort of "hostage" thing? As in, Team 1 has to kill a player on Team 2 but Team 2 must defend him? If so, you might want to give the "hostage" a token inventory item at the start of each round. Something like "IsHostage". Then you can check for the presence of that item in the DEATH script.
Code: Select all
script 888 DEATH
{
if (checkinventory("IsHostage") == 1)
{
Team_GivePoints(etc etc etc)
}
}
RE: How to make a "win condition"?
Posted: Fri Dec 14, 2012 3:57 pm
by Lollipop
I could easily make a workaround for that, its a good idea and it will fit perfectly into my current scripting :)