How to make a "win condition"?

Discuss all aspects related to modding Zandronum here.
Post Reply
Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

How to make a "win condition"?

#1

Post by Lollipop » Tue Dec 11, 2012 4:04 pm

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... >.<
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

User avatar
Ænima
Addicted to Zandronum
Posts: 3582
Joined: Tue Jun 05, 2012 6:12 pm

RE: How to make a "win condition"?

#2

Post by Ænima » Tue Dec 11, 2012 5:01 pm

while (condition == false) // "condition" can be anything.
{
delay(5);
}
// make whatever team win
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: How to make a "win condition"?

#3

Post by Lollipop » Tue Dec 11, 2012 5:02 pm

well, the condition isnt the problem, the winning thing is the problem :'(
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: How to make a "win condition"?

#4

Post by Qent » Tue Dec 11, 2012 5:07 pm


Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: How to make a "win condition"?

#5

Post by Lollipop » Tue Dec 11, 2012 5:08 pm

Thank you, I dont have time time right now, but ill try it tomorrow if i can :)
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

Cruduxy
Zandrone
Posts: 1059
Joined: Fri Jun 08, 2012 4:24 pm

RE: How to make a "win condition"?

#6

Post by Cruduxy » Tue Dec 11, 2012 6:13 pm

Is it possible to use gamemode lump to limit a team in player numbers?
[][][][][][][][][][][][][][][]
Nothing to see here
[][][][][][][][][][][][][][][]

Qent
Retired Staff / Community Team Member
Posts: 1424
Joined: Tue May 29, 2012 7:56 pm
Contact:

RE: How to make a "win condition"?

#7

Post by Qent » Tue Dec 11, 2012 6:41 pm

No, you need some ACS for that AFAIK.

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: How to make a "win condition"?

#8

Post by Lollipop » Thu Dec 13, 2012 2:51 pm

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
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

User avatar
Ænima
Addicted to Zandronum
Posts: 3582
Joined: Tue Jun 05, 2012 6:12 pm

RE: How to make a "win condition"?

#9

Post by Ænima » Thu Dec 13, 2012 3:38 pm

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.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: How to make a "win condition"?

#10

Post by Lollipop » Thu Dec 13, 2012 4:58 pm

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...
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

one_Two
Addicted to Zandronum
Posts: 1753
Joined: Thu Jun 07, 2012 4:47 pm

RE: How to make a "win condition"?

#11

Post by one_Two » Thu Dec 13, 2012 5:05 pm

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

User avatar
Ænima
Addicted to Zandronum
Posts: 3582
Joined: Tue Jun 05, 2012 6:12 pm

RE: How to make a "win condition"?

#12

Post by Ænima » Thu Dec 13, 2012 5:32 pm

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)
  }
}
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

RE: How to make a "win condition"?

#13

Post by Lollipop » Fri Dec 14, 2012 3:57 pm

I could easily make a workaround for that, its a good idea and it will fit perfectly into my current scripting :)
Combinebobnt wrote:i can see the forum league is taking off much better than the ctf ones
GalactusToday at 1:07 PM
are you getting uncomfortable jap
feeling something happen down there

Post Reply