0 Members and 3 Guests are viewing this topic.
//SuperVillians Script v0.3 //concocted and shoddily put together by Londonbrig0 var VTeam: array[1..12] of string; //VTeam is supposed to stand for "villian team" Leader: array[1..12] of boolean; //and 12 is current max number of players i: integer; //used for id of players Winner: boolean; //variable used to end game when everyone is on the same team //When someone joins, set their team to their own name, and make them a leaderprocedure OnJoinGame(ID, Team: byte); begin VTeam[ID] := +IDToName(ID); if VTeam[ID] = +IDToName(ID) then Leader[ID] := true; end;//this is so I can check teams when I'm testing//I'll probably leave this in to let players check the teams ingame if they want.function OnCommand(ID: Byte; Text: string): boolean; begin if (Text = '/teams') then for i := 1 to 12 do begin WriteConsole(ID, +IDToName(i) +' is on team ' +VTeam[i], $EE81FAA1) end; end;//what happens when someone is killedprocedure OnPlayerKill(Killer, Victim: byte;Weapon: byte); begin if VTeam[Victim] = VTeam[Killer] then //if it was somehow a team kill SetScore(Killer,GetPlayerStat(Killer, 'Kills') - 1) //take away the point the killer got else begin VTeam[Victim] := VTeam[Killer]; //they are now fighting on the team of their killer SetScore(NameToID(VTeam[Killer]),GetPlayerStat(NameToID(VTeam[Killer]), 'Kills') + 1); //the leader of the killer's team get's a bonus point if Leader[Victim] = true then //if the victim was a leader begin Leader[Victim] := false; //the victim is now no longer a leader for i := 1 to 12 do begin if VTeam[i] = +IDToName(Victim) then //everyone who was fighting for the victim begin VTeam[i] := +IDToName(i); //are now free Leader[i] := true //and leaders again end; end; end; end;//There are probably issues with semicolons between line 26 and here Winner := true; //temporarily set end game variable for i := 1 to 12 do begin if VTeam[i] != +IDToName(Killer) then //is there anyone not on the killer's team? Winner := false; //if so, no one has won yet end; if Winner = true then //if there is a winner begin DrawText(0,2,'Team' + VTeam[Killer] + 'wins!',330,RGB(255,0,0),0.20,40,240); TimeLeft := 0; //end the game (will this work?) end; end;
Soldat has only 4 teams(and spectator). It's possible but will suck ass.
begin if player[shooter].team = player[victim].team then result := 0; // Or something like thisend;
Why don't you just use the teams to show which team they are on (wow, ingenious)
I already covered everything in the very first reply...
Quote from: chutem on December 15, 2009, 01:10:50 amWhy don't you just use the teams to show which team they are on (wow, ingenious)Yeah, I could do that, but like I said, up to 12 people need the ability to be on their own team at the start of the game
Quote from: Londonbrig0 on December 15, 2009, 11:36:10 amQuote from: chutem on December 15, 2009, 01:10:50 amWhy don't you just use the teams to show which team they are on (wow, ingenious)Yeah, I could do that, but like I said, up to 12 people need the ability to be on their own team at the start of the gameAnd saving players teams and resetting them at the end of a round OR splitting teams up randomly doesn't solve this problem?Or am I not understanding you...
it would have to be a free-for-all
You could put the leader of alpha team on charlie, and bravo's leader on delta, then script it so the team can't kill their leader and away we go.Now we have:A way of seeing who is on what team, and who the leader of each team is.And a way of having up to 32 people to be in two teams: alpha-charlie, bravo-deltadoes that satisfy you?Quote from: Londonbrig0 on December 16, 2009, 10:32:50 amit would have to be a free-for-allWhy?
http://www.enesce.com/help/index.html?Functions/WorldImage.htmlorhttp://www.enesce.com/help/html/Functions/WorldText.htmlDisplay a text above heads. Use different colors. Be happy :]
How are you going to negate m79 shot btw?