Fortress Forever

Fortress Forever (https://forums.fortress-forever.com/index.php)
-   Lua (https://forums.fortress-forever.com/forumdisplay.php?f=44)
-   -   Ball Carrier and Allies (https://forums.fortress-forever.com/showthread.php?t=16664)

GeoKill-----> 07-24-2008 10:32 PM

Ball Carrier and Allies
 
So Ruta mention how people are supposed to go after the ball carrier in Murderball but people were not doing that. So it got me thinking.

Is it possible to make Teams that don't have the ball into allies and once the ball is drop then they are not allied no more?

Tsukasa 07-26-2008 03:43 AM

Sure, have two teams.

:lol:

Ihmhi 07-26-2008 03:51 AM

I'm sure you could hot-swap the Lua code for Hunted? (Red and Blue allies).

The thing is, infighting among the other three teams, accidental kills, etc. are part of the fun of murderball.

I know the objective icon can point towards an entity, but can it point towards a player in realtime? That might be nice for murderball.

Of course, one could also make the point that that might break the whole gameplay aspect of it. You're already roughly aware of where the ball is, so... yeah.

GeoKill-----> 07-26-2008 04:40 AM

but how will it work so they don't become allies once the ball is dropped?

Also this will be tested, if it doesn't work or takes away the fun out of the map then I would revert it back.

Rutabeggar 07-26-2008 04:56 AM

I enjoy the chaos of murderball as much as anyone, but as Geo said, getting fragged mid-field while running to attack the team with the ball is just a buzz kill...

I was thinking something along the lines of when a team touches a ball, the ball acts as a trigger and the hot-swap happens as described above (if green touched the ball, blue, red, and yellow would be allies), place entities at the entrances to every base, i.e. the front doors, the cave, the bats, that turns the hot-swap off and that would allow for the "accidental" kills that happen when bum rushing but would make working with the other teams viable, the ball drop would return everyone back to enemies until it's picked up again...not sure if .lua can work that way...just an idea for Nuk3m.

Also, people wouldn't use snipers to pick off people in the mid field...would just shoot at each other.

1. Ball is in middle, everyone is still on opposing teams.
2. Ball gets picked up by green, .lua forces red, blue, and yellow to the same "team" while in mid-field
3. Players from red, blue, and yellow cross the thresholds of the green base, which has an entity trigger that turns off the previous .lua script
4. Chaos ensues in green base...ball is dropped
5. Ball returns to middle which triggers everything back to normal again until ball is picked up again.
6. Ball is picked up by blue, wash, rinse, repeat.

Tsukasa 07-26-2008 05:05 AM

On a more serious note, I don't think its currently possible. Forcing a team switch respawns you I believe.

squeek. 07-26-2008 05:27 AM

Quote:

Originally Posted by Tsukasa
On a more serious note, I don't think its currently possible. Forcing a team switch respawns you I believe.

Only if you also apply the respawn flag. It's very possible (see conc tag, but, uh, you can't yet; anyway, it's possible).

Also, setting and removing allies is possible.

GeoKill-----> 07-26-2008 05:43 AM

conc tag eh?

squeek. 07-26-2008 05:56 AM

This should work, although it is untested.

When ball is picked up:
Code:

local carrying_team = GetTeam( player:getTeamId() )
SetAlliesAgainstCarrier( carrying_team )

When ball is dropped/returns:
Code:

ClearAllAllies()
And the functions that do the stuff:
Code:

function SetAlliesAgainstCarrier( carrying_team )
  -- 2 is blue, 3 is red, 4 is yellow, 5 is green
  for i=2,5
    local team = GetTeam( i )
    if team ~= carrying_team then
      for j=2,5
        local ally_team = GetTeam( j )
        if ally_team ~= carrying_team then
          team:SetAllies( ally_team:GetTeamId() )
        end
      end
    end
  end
end

Code:

function ClearAllAllies()
  -- 2 is blue, 3 is red, 4 is yellow, 5 is green
  for i=2,5
    local team = GetTeam( i )
    team:ClearAllies()
  end
end

I'm still not sure if it's possible to SetAllies outside the startup() function, but if it is... the above code should work.

GeoKill-----> 07-26-2008 05:57 AM

I'll test it out tnx

Nezumi 07-26-2008 10:11 AM

It might work better if teams that don't have possesion do like half damage to eachother.

...should that be possible.

pF 07-26-2008 11:10 AM

This might be useful for Peon's FFNL footy league .. :D

GeoKill-----> 07-26-2008 07:09 PM

Well Squeek's code was bug or something not sure but Jester helped me out last night. The Lua works and tested this out with around 11 people. People were a bit confused at first but after a while they got the hang of it. Tnx you guys

squeek. 07-27-2008 02:27 AM

Mind posting Jester's code for fun?

Jester 07-27-2008 03:48 AM

You just forgot "do's" with your "for's" (if->then for->do) and your SetAlliesAgainstCarrier needed to take in the team ID not the team.

http://pastebin.com/m60cc4233
Theres the snippets of the lua.

pF 07-27-2008 04:22 AM

Jester = beast.

squeek. 07-27-2008 10:20 AM

Quote:

Originally Posted by Jester
You just forgot "do's" with your "for's" (if->then for->do) and your SetAlliesAgainstCarrier needed to take in the team ID not the team.

http://pastebin.com/m60cc4233
Theres the snippets of the lua.

Ah, thanks for sorting that. :)

MonoXideAtWork 08-15-2008 05:01 PM

I had a chance to play this last night with Killtron, and while being confused at first, I think it adds a very much needed team element to the map! We had the closest team scores I had ever seen in a pub with something like 48 50 76 7. Not bad at all for a game that is usually red against the world. I was on yellow (76 points) whoooooo.

Hammock 08-15-2008 08:42 PM

Will the objective icon show where the ball carrier is? That would suck. Half the battle of O is locating the ball carrier in the base. Would definately suck the fun out of the game if everyone knew exactly where to enter and spam the enemy base.

GeoKill-----> 08-15-2008 08:49 PM

I really doubt the icon would be used in this map


All times are GMT. The time now is 06:13 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.