Page 1 of 1

Several LUA brain busters

Posted: Sat Dec 31, 2011 8:42 pm
by Teancum
Scenario #1: Deathmatch

Here's an interesting one. I'm building a Deathmatch mode (dubbed Combat Training) on the Xbox. The code basically forces everyone onto team 1 an has no AI spawn. When the first player spawns the first time they're assigned to team 1, the second person team 2, the third team 3, etc. The team # is stored in a variable on a per-player basis. When they die, they're reassigned to team 1, they respawn, then are reassigned to their stored team. I don't have any LUA code yet, just pseudo code to understand the process.

Now, here's the issue - assigning Victory. My thought was once the assigned number of points are reached the winner is assigned to team 1 while all losers are assigned to team 2. Here's the problem: if a losing player is on team 1 and we assign the winner to team 1 how do we move the loser while keeping the winner on the winning team?




Scenario #2: Bounty Hunters

Simple enough -- this is a wave-based mode, but different bounties have different "credit" (point) values. Some waves have multiple. Each bounty is marked with MapAddEntityMarker(). The question is this: what are the different valid colors that can be used? Anyone know? I'd like to use about a half a dozen different point values.


More to come.

Re: Several LUA brain busters

Posted: Sun Jan 01, 2012 4:43 am
by Jaspo
For the first, it wouldn't be as simple as instead putting the winner on team 2 and the losers on team 1, would it? Because until the end nobody is on team 2 but dead people are on team 1? And the team variables have nothing to do with "teams" as the battlefront engine knows them, right?

Re: Several LUA brain busters

Posted: Sun Jan 01, 2012 5:43 am
by [RDH]Zerted
1) Won't work, I've tried that. The PC game can't handle that many real or fake teams (it crashes to desktop). I assume the XBox can't do it too. The best option I came up with was putting everyone on a team that was an enemy of itself.
2) The game only uses YELLOW. You can try other values and/or change the marker size and icons. The MapXXX methods have a lot of parameters.

For quick reference:
MapAddClassMarker
MapAddEntityMarker
MapAddRegionMarker
MapRemoveClassMarker
MapRemoveEntityMarker
MapRemoveRegionMarker

Re: Several LUA brain busters

Posted: Sun Jan 01, 2012 7:24 pm
by fasty
I know the game uses BLUE and RED also. I don't think there are anymore than those 3.

Re: Several LUA brain busters

Posted: Sun Jan 01, 2012 7:25 pm
by THEWULFMAN
Don't hold me to it, but I think GREEN works too.

Re: Several LUA brain busters

Posted: Thu Jan 05, 2012 8:23 pm
by Tears2Roses
THEWULFMAN wrote:Don't hold me to it, but I think GREEN works too.
green works, I believe its in the dark times 2 V.I.P mode. I know it works, anyhow.