Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Need a Script

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
Coghner
Meatbag
Posts: 7
Joined: Fri Aug 19, 2016 7:58 pm

Need a Script

Post by Coghner » Sun Nov 06, 2016 9:35 pm

i'm searching for a Script that kills all the players from a team (like,when a certain objective is done,all the players from the loser team dies.)
is it even possible? thx!
1 x
Potato is Batata in BR-Portuguese

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Mon Nov 07, 2016 5:02 pm

This is the script:

Code: Select all

public void KillTeam(PlayerTeam TeamtoKill){
	foreach(IPlayer temp in Game.GetPlayers())
	{
	 if(temp.GetTeam().Equals(TeamtoKill))
	temp.Kill();
	}
}
Use this function call when you need to kill an entire team:
KillTeam(PlayerTeam.Team4);

finally you have to use this range of values for choosing the team:
Image
2 x

Coghner
Meatbag
Posts: 7
Joined: Fri Aug 19, 2016 7:58 pm

Post by Coghner » Mon Nov 07, 2016 11:30 pm

Thx man! you helped me alot!
now i am in a bit of trouble... i got a Respawn Script,but it dont works! i got a lot of errors... without it,my map dont work man. do you know a "better" Respawn Script?
1 x
Potato is Batata in BR-Portuguese

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Tue Nov 08, 2016 12:23 am

Coghner wrote:Thx man! you helped me alot!
now i am in a bit of trouble... i got a Respawn Script,but it dont works! i got a lot of errors... without it,my map dont work man. do you know a "better" Respawn Script?
Tell me what features the respawn script must have (like custom respawn locations or a countdown, you must specify everything you need).
1 x

Coghner
Meatbag
Posts: 7
Joined: Fri Aug 19, 2016 7:58 pm

Post by Coghner » Tue Nov 08, 2016 9:30 pm

its like,i am making about BOXES. there's 2 teams,the team who destroy the enemy box wins. im using Shut's Team select room,and i want them to respawn at their respective team base.
and i having some trouble to use the Team Kill Script,its giving me some errors :/ can you make a template map? i'm too idiot to use them without a "example" (sorry ;-;)
1 x
Potato is Batata in BR-Portuguese

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Wed Nov 09, 2016 4:47 pm

Here there is the template map:
DOWNLOAD

If you have problems with your actual respawn script and if you want, you can give me the map by PM and I will adapt the scripts specially for the map.
1 x

Coghner
Meatbag
Posts: 7
Joined: Fri Aug 19, 2016 7:58 pm

Post by Coghner » Wed Nov 09, 2016 8:33 pm

ok them.i thinks its very ugly atm,but you dont need to judge it xD
1 x
Potato is Batata in BR-Portuguese

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Wed Nov 09, 2016 8:48 pm

No problem man I'm here to help and not to judge :)
1 x

User avatar
Guille_dlC
Fighter
Fighter
Posts: 41
Joined: Tue Sep 13, 2016 9:27 pm
SFD Account: Guille_dlC
SFD Alias: Ghost
Started SFD: Pre-alpha 1.6.0
Location: Madrid
Gender:
Age: 21

Post by Guille_dlC » Wed Nov 09, 2016 10:38 pm

Wow Jack! You are a really cool guy, caring about other people's scripts 'n' maps! You are awesome!
0 x
Remove melee

Coghner
Meatbag
Posts: 7
Joined: Fri Aug 19, 2016 7:58 pm

Post by Coghner » Thu Nov 10, 2016 12:11 am

Yep Guille,Jack is helping me alot man!
1 x
Potato is Batata in BR-Portuguese

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Fri Nov 11, 2016 5:24 pm

I've changed the gamemode, disabled the death sequence and overhauled the map code,many things was useless for you, this because the used script was designed to add more gameplay mechanics, now it has only the used functions with a working respawn system, I hope it is what you wanted.

DOWNLOAD
1 x

Coghner
Meatbag
Posts: 7
Joined: Fri Aug 19, 2016 7:58 pm

Post by Coghner » Fri Nov 11, 2016 11:10 pm

thx man,thats exactly what it wanted! you helped me a lot man,thx.
1 x
Potato is Batata in BR-Portuguese

Post Reply