Raised This Month: $ Target: $400
 0% 

[Scripting]Detecting/killing an entity without aiming at it


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kasea
Member
Join Date: Feb 2015
Old 06-27-2015 , 15:37   [Scripting]Detecting/killing an entity without aiming at it
Reply With Quote #1

Basically i was wondering if it would be possible to detect if a client is currently in contact with a func_physbox, and if the client is in contact with a func_physbox it would remove that physbox.

Furthermore for perfomance reasons, i was wondering if i could make it call a function whenever a client is touching a func_physbox.

But what I'm most curious about is, would it be possible to kill this entity without looking at it?

Thanks
Kasea is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 06-27-2015 , 17:52   Re: [Scripting]Detecting/killing an entity without aiming at it
Reply With Quote #2

hook it for SDKHook_StartTouch

I don't see how that has anything to do with whether or not the player is looking at it though.


If you want to use a /command and target an entity, without using @aimtarget or whatever it was...

You'd need to make something that can do it.

It might be interesting to make a command that prints a list of EntRefs related to an entity classname you input.

/getentrefs func_physbox

Found 2 `func_physbox` with entrefs:
0xFAF43CE2
0x99BC3216

for example, then

/delete 0xFAF43CE2

0x might be okay to use for targeting entrefs, I'd make sure to check that it's > MaxClients for a command intended to do so, because if you're targeting a normal player you probably should do it via normal means


or maybe @0x or #hexcode or @#.... well.... if someone has a bad name you can always rename them.
__________________
Chdata is offline
Kasea
Member
Join Date: Feb 2015
Old 06-28-2015 , 03:26   Re: [Scripting]Detecting/killing an entity without aiming at it
Reply With Quote #3

Thanks this is a great start ^.^
Kasea is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode