[DECORATE] Red/Blue spawn for TDM

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
doomista
Forum Regular
Posts: 147
Joined: Sat Mar 07, 2015 6:58 pm
Location: I've been to hell. Twice

[DECORATE] Red/Blue spawn for TDM

#1

Post by doomista » Mon Apr 18, 2016 6:04 pm

Hi,
Is it possible to have teams defined in teaminfo bound to blue/red spawns with ids 5080 and 5081? How?
And would it then be usable in TDM?
Thanks

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

[DECORATE] Re: Red/Blue spawn for TDM

#2

Post by SwordGrunt » Mon Apr 18, 2016 7:31 pm

Sure, one of the properties in TEAMINFO is PlayerStartThingNumber.

http://zdoom.org/wiki/TEAMINFO
Spoiler: zandronum.pk3/TEAMINFO.txt (Open)

Code: Select all

ClearTeams

Team "Blue"
{
	PlayerColor "00 00 BF"
	TextColor "Blue"
	RailColor "00 00 FF"

	FlagItem "BlueFlag"
	SkullItem "BlueSkullST"

	PlayerStartThingNumber 5080
	SmallFlagHUDIcon "STFLA1"
	SmallSkullHUDIcon "STKEYS3"
	LargeFlagHUDIcon "BFLASMAL"
	LargeSkullHUDIcon "BSKUA0"
}

Team "Red"
{
	PlayerColor "BF 00 00"
	TextColor "Red"
	RailColor "FF 00 00"

	FlagItem "RedFlag"
	SkullItem "RedSkullST"

	PlayerStartThingNumber 5081
	SmallFlagHUDIcon "STFLA2"
	SmallSkullHUDIcon "STKEYS5"
	LargeFlagHUDIcon "RFLASMAL"
	LargeSkullHUDIcon "RSKUA0"
}

Team "Green"
{
	PlayerColor "00 BF 00"
	TextColor "Green"
	RailColor "00 FF 00"

	FlagItem "GreenFlag"
	SkullItem "GreenSkullST"

	PlayerStartThingNumber 5083
	SmallFlagHUDIcon "STFLA4"
	SmallSkullHUDIcon "GSKLSMAL"
	LargeFlagHUDIcon "GFLASMAL"
	LargeSkullHUDIcon "GSKLBIG"
}

Team "Gold"
{
	PlayerColor "FF FF 00" // This needs to be full to look good.
	TextColor "Gold"
	RailColor "FF FF 00"

	FlagItem "GoldFlag"
	SkullItem "GoldSkullST"

	PlayerStartThingNumber 5084
	SmallFlagHUDIcon "STFLA5"
	SmallSkullHUDIcon "STKEYS4"
	LargeFlagHUDIcon "YFLASMAL"
	LargeSkullHUDIcon "YSKUA0"
}
You can clearteams and define two teams in whichever way you want using PlayerStartThingNumber 5080 on one (blue start) and 5081 on the other (red start)

User avatar
doomista
Forum Regular
Posts: 147
Joined: Sat Mar 07, 2015 6:58 pm
Location: I've been to hell. Twice

[DECORATE] Re: Red/Blue spawn for TDM

#3

Post by doomista » Mon Apr 18, 2016 8:05 pm

SwordGrunt wrote:Sure, one of the properties in TEAMINFO is PlayerStartThingNumber.

http://zdoom.org/wiki/TEAMINFO
Spoiler: zandronum.pk3/TEAMINFO.txt (Open)

Code: Select all

ClearTeams

Team "Blue"
{
	PlayerColor "00 00 BF"
	TextColor "Blue"
	RailColor "00 00 FF"

	FlagItem "BlueFlag"
	SkullItem "BlueSkullST"

	PlayerStartThingNumber 5080
	SmallFlagHUDIcon "STFLA1"
	SmallSkullHUDIcon "STKEYS3"
	LargeFlagHUDIcon "BFLASMAL"
	LargeSkullHUDIcon "BSKUA0"
}

Team "Red"
{
	PlayerColor "BF 00 00"
	TextColor "Red"
	RailColor "FF 00 00"

	FlagItem "RedFlag"
	SkullItem "RedSkullST"

	PlayerStartThingNumber 5081
	SmallFlagHUDIcon "STFLA2"
	SmallSkullHUDIcon "STKEYS5"
	LargeFlagHUDIcon "RFLASMAL"
	LargeSkullHUDIcon "RSKUA0"
}

Team "Green"
{
	PlayerColor "00 BF 00"
	TextColor "Green"
	RailColor "00 FF 00"

	FlagItem "GreenFlag"
	SkullItem "GreenSkullST"

	PlayerStartThingNumber 5083
	SmallFlagHUDIcon "STFLA4"
	SmallSkullHUDIcon "GSKLSMAL"
	LargeFlagHUDIcon "GFLASMAL"
	LargeSkullHUDIcon "GSKLBIG"
}

Team "Gold"
{
	PlayerColor "FF FF 00" // This needs to be full to look good.
	TextColor "Gold"
	RailColor "FF FF 00"

	FlagItem "GoldFlag"
	SkullItem "GoldSkullST"

	PlayerStartThingNumber 5084
	SmallFlagHUDIcon "STFLA5"
	SmallSkullHUDIcon "STKEYS4"
	LargeFlagHUDIcon "YFLASMAL"
	LargeSkullHUDIcon "YSKUA0"
}
You can clearteams and define two teams in whichever way you want using PlayerStartThingNumber 5080 on one (blue start) and 5081 on the other (red start)
Thanks a lot, I totally overlooked the PlayerStartThingNumber

One more question though. How are team points actually managed? I mean, is there some global variable: Team1Score, Team2Score, or is score determined as the sum of all players on the team? And can I access and change these variables from a script?
To be clear, I am learning decorate and the ACS right now and I want to remake the Assault gamemode from UT1999. So far I have team definitions and generic items that have to be destroyed in order for Assaulters to win the map, in theory I can set the assaulters score after destroying the core, but if assaulters fail to do their job, I need to tell the game that Defenders won. Technically it's the last bit to be done and I am literally struggling to find any valid entry on this topic on the wiki.

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

[DECORATE] Re: Red/Blue spawn for TDM

#4

Post by SwordGrunt » Mon Apr 18, 2016 9:17 pm


User avatar
doomista
Forum Regular
Posts: 147
Joined: Sat Mar 07, 2015 6:58 pm
Location: I've been to hell. Twice

[DECORATE] Re: Red/Blue spawn for TDM

#5

Post by doomista » Mon Apr 18, 2016 10:25 pm

SwordGrunt wrote:These two functions should help you a lot:

http://wiki.zandronum.com/GetTeamProperty
http://zdoom.org/wiki/Team_Score
Wow, you're the best! They already helped a lot, though I need a newer ACC (at least new zdefs) because I don't have TPROP_Score defined and I still haven't guessed it's int ID. And I also need to come up with the solution how to make killer of the object the activator of some script.

User avatar
SwordGrunt
Forum Regular
Posts: 377
Joined: Thu Jun 07, 2012 8:43 pm

[DECORATE] Re: Red/Blue spawn for TDM

#6

Post by SwordGrunt » Tue Apr 19, 2016 12:24 am

If your object is shootable (I don't think it has to be a monster, but it might), use A_GiveToTarget to give a custom inventory item that activates said script.

I haven't dabbled with that in a while so I don't know but the Zandronum wiki should have the latest ACC you need... pretty sure I read something about that when browsing the functions.

User avatar
doomista
Forum Regular
Posts: 147
Joined: Sat Mar 07, 2015 6:58 pm
Location: I've been to hell. Twice

[DECORATE] Re: Red/Blue spawn for TDM

#7

Post by doomista » Tue Apr 19, 2016 8:55 am

SwordGrunt wrote:If your object is shootable (I don't think it has to be a monster, but it might), use A_GiveToTarget to give a custom inventory item that activates said script.
Exactly what I needed, thanks a lot, you really helped a lot.
SwordGrunt wrote:I haven't dabbled with that in a while so I don't know but the Zandronum wiki should have the latest ACC you need... pretty sure I read something about that when browsing the functions.
On the wiki I only found how to access new function, not constants, but nevermind, I've downloaded new ACC from zdoom home page and it's working now

Post Reply