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.

Is it possible that gibzone affect only for objects?

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
renttis
Meatbag
Posts: 2
Joined: Sun Jul 24, 2016 8:28 pm

Is it possible that gibzone affect only for objects?

Post by renttis » Tue Mar 14, 2017 9:22 pm

Is it possible that gibzone affect only for objects, not to players? Or can i compile script using area trigger?
0 x

Dumby Eggy
Superfighter
Superfighter
Posts: 66
Joined: Wed Dec 21, 2016 4:22 am
SFD Account: Huevon NEO
SFD Alias: Huevon SFD
Started SFD: PreAlpha 1.8.8
Location: Honduras
Gender:
Age: 21

Post by Dumby Eggy » Tue Mar 14, 2017 11:29 pm

GibZone = affects everything.

If you need a script to gib players, here's one:

Code: Select all

/* A simple way to gib a player :D */

public void OnStartup()
{
	if(args.Sender is IPlayer)
	{
		IPlayer ply = (IPlayer)args.Sender;
		ply.Gib();
	}
}
you need to put this in an area trigger so it works. Preferably put in on it says "On Enter Method".
0 x
HINT: You will not surprise me if you are good with snipers and magnums and katanas; but I will give my respect for someone who is a weapon-master. So don't wait any cheer marksmen...8-)

User avatar
KliPeH
Moderator
Moderator
Posts: 914
Joined: Sat Mar 19, 2016 3:03 pm
Title: [happy moth noises]
SFD Account: KliPeH
Started SFD: Pre-Alpha 1.4.2
Gender:
Contact:

Post by KliPeH » Wed Mar 15, 2017 12:55 am

renttis wrote:only for objects, not to players?
Dumby Eggy wrote:If you need a script to gib players, here's one:
I was under the impression the dude wanted the script to work solely on objects, not players.
0 x
 
Image

User avatar
ShutDownMan
Fighter
Fighter
Posts: 32
Joined: Sat Mar 19, 2016 7:17 pm
Title: Yeah, science!
SFD Alias: ShutDownMan, Devil Shut
Started SFD: 1.2.something
Location: Hu3, Brazil
Gender:
Age: 24
Contact:

Post by ShutDownMan » Wed Mar 15, 2017 1:38 am

Create an area trigger with script method set to "ObjectGib" (no quotes)

Code: Select all

public void ObjectGib(TriggerArgs args)
{
   if(!(args.Sender is IPlayer))
   {
      (args.Sender as IObject).Destroy();
   }
}
1 x
~ShutDownMan

Dumby Eggy
Superfighter
Superfighter
Posts: 66
Joined: Wed Dec 21, 2016 4:22 am
SFD Account: Huevon NEO
SFD Alias: Huevon SFD
Started SFD: PreAlpha 1.8.8
Location: Honduras
Gender:
Age: 21

Post by Dumby Eggy » Wed Mar 15, 2017 1:50 am

:lol: oh, forgot some details in request sorry.
0 x
HINT: You will not surprise me if you are good with snipers and magnums and katanas; but I will give my respect for someone who is a weapon-master. So don't wait any cheer marksmen...8-)

renttis
Meatbag
Posts: 2
Joined: Sun Jul 24, 2016 8:28 pm

Post by renttis » Wed Mar 15, 2017 4:54 pm

That helped me, thank you so much!
0 x

Post Reply