Page 1 of 1

Game Flag Script help

Posted: Wed Oct 21, 2009 9:01 pm
by Point
ok since it seems many things are possible with scripts... how bout this...

Game flags dont animate though scenery does... so I have both animated team flags (scenery) and a flag base that is the game scoring flag...

Union Flag/ Confederate Flag...
USA flag / VC flag / NVA Flag
US FLAG BRIT FLAG / NAZI Flag/ etc...
Light Standard / Dark Standard...

anyway is there a way on maps to have a script that changes the flag based on which team holds the area? ... ie not just color of an non animated flag...

I would like the script to replace a flag pole with animated (blowing in the wind) Light flag or dark flag depending on which team holds the flag. maybe even white flag when contested...

Thanks.

Image



also anyone done a fps style capture the flag game type variant... since I have flag bearers in tagsets units can go get the flag and bring them back to base etc...

Re: Game Flag Script help

Posted: Wed Oct 21, 2009 9:12 pm
by Pyro
The switching flags via script does not sound possible. The fps capture the flag gametype script does sound possible.

Re: Game Flag Script help

Posted: Wed Oct 21, 2009 9:28 pm
by Pyro
Silly me, you could always fake it. Make the actual netgame flag scenery something that is basically invisible to everyone. On that same spot you place a projectile flag. Now all that would need to be done is find a way to detect who owns that flag. Once you know that, then you use a script to replace that flag proj with the other flag proj.

Though I can't think of an accurate way to detect who owns the flag. I wonder if the Netgame Type "Winning Team Index" (team, integer) could be used to find out. I'm not even sure if this parameter works or not.

Re: Game Flag Script help

Posted: Thu Oct 22, 2009 1:53 am
by Point
well in operation Flashpoint i did this on maps though it was built into the game types....

maybe the test could be something like this in a geometry for each territory
light units present no dark units present raise flag LIght...
Dark units present no light units present raise dark flag
both light and dark units present raise flag pole or white flag
???????????

as to how this would be scripted I have no clue.

Re: Game Flag Script help

Posted: Thu Oct 22, 2009 10:05 am
by vinylrake
I think I saw a reference to a FPS style game variant in the new Deadfall mapset.

Re: Game Flag Script help

Posted: Thu Oct 22, 2009 5:17 pm
by Jon God
vinylrake wrote:I think I saw a reference to a FPS style game variant in the new Deadfall mapset.
There is one map with a game mode where you can, if deathmatch is toggled, respawn in multiple places randomly.

The flags spawn at each base, and need to be picked up by the other team, and brought back to their own base to score a point, and if dropped returns to base after 30 seconds.

Re: Game Flag Script help

Posted: Fri Oct 23, 2009 7:10 pm
by haravikk
You can implement custom game-types quite nicely by just using a script to detect a unit carrying the flag in the scoring area, forcibly removing the flag, and triggering a script that kills an assassin target hidden off the side of the map for example, to give the scoring team a point.

Re: Game Flag Script help

Posted: Sat Oct 24, 2009 12:43 pm
by Point
hmm without a script maybe the flag projectile when discarded could simply projectile to unit into a stampede unit...

can newly created units be stampede targets?

Re: Game Flag Script help

Posted: Sat Oct 24, 2009 5:53 pm
by Pyro
Nope.

Re: Game Flag Script help

Posted: Sun Oct 25, 2009 5:16 am
by haravikk
Point wrote:hmm without a script maybe the flag projectile when discarded could simply projectile to unit into a stampede unit...

can newly created units be stampede targets?
Assassin units is the simplest; you just create a line of assassin units for each player, somewhere inaccessible off the edge of the map. Have them facing each other and give them an attack that will instantly kill the target (but make sure they don't auto-target).

Then use a geometry filter to detect the appropriate flag-marker in the scoring zone, if detected you remove the flag (give it to an ambient unit or something), then have one of the scoring team's assassin targets kill one of the flag-owner's assassin targets, granting the scoring team a point.

With two teams this is super-easy, as when the last assassin target is killed the game will end, otherwise it goes by score when time runs out. With multiple teams you may need do something more complicated like making a special unit visible (again off the map) for each point a team scores, then test to see if any team has the maximum, or test to see which team has the most.

Re: Game Flag Script help

Posted: Tue Dec 08, 2009 10:09 am
by Point
CWR Honor Redeemed ...

thanks to magma.... Flags switch from Light team flag to Dark team flag when Captured... this is CoOp of course can the same script be used in a multiplayer game?

Re: Game Flag Script help

Posted: Tue Dec 08, 2009 5:13 pm
by Pyro
Point wrote:to magma.... Flags switch from Light team flag to Dark team flag when Captured... this is CoOp of course can the same script be used in a multiplayer game?
What did Magma do for this to be done? Sounds like a feature was added to allow such a thing, or maybe I'm reading this wrong?

Re: Game Flag Script help

Posted: Tue Dec 08, 2009 6:49 pm
by vinylrake
Capture the Flag game where units pick up flag and bring it back to base? Manistee Paintball Challenge.

doh!

I knew that sounded familiar.

Re: Game Flag Script help

Posted: Tue Dec 08, 2009 8:46 pm
by Jon God
vinylrake wrote:Capture the Flag game where units pick up flag and bring it back to base? Manistee Paintball Challenge.

doh!

I knew that sounded familiar.
Deadfall has it as well. :)

Re: Game Flag Script help

Posted: Tue Dec 08, 2009 11:55 pm
by Point
no beyond the capture the flag fps style

i was talking about the origional thought of having an animated flag change from one teams to another when taken... say rebel to union... in magmas blue vs gray honor redeemed that works in the coop map.

I wanted to try and use that script in a multiplayer map for ctf and territories etc... just wondering if scripts in multiplayer maps work the same...