Raised This Month: $ Target: $400
 0% 

Triggered light question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-27-2014 , 21:28   Triggered light question
Reply With Quote #1

Hi Alliedmodders!

What if i delete light entity what has target name and what can be turned on/off, can i recreate that light entity what turns that light source on/off?
What i wish to do is remove all entity lights to gave more entity slots and play with one light to turn on/off light sources.
I'll be running maps what have so many light entities
( they are for costom entity, for example spot light what can be break )

Using dynamic light message is really bad idea because of the lag.
Basically if we find the way how to have only one light entity then i can basically replace
zp nightvision with no lag one.

I know that the light source is build inside the bsp and can not be moved, it can be only turned on/off and thats fine too.

Edit:
To be honest, i already know that this what im trying to do is possible.
Since the light entities are only in server side, server must be sending to client a index of some sort what lets engine know, which
light source will be switched.

What happens when light entity get triggered?
Is there any source code in sdk what would lead me to right way?

Thank you for your attention!

Last edited by .Dare Devil.; 07-27-2014 at 21:41.
.Dare Devil. is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 07-27-2014 , 23:13   Re: Triggered light question
Reply With Quote #2

Tried searching?. This thread may have some useful information in it.

Here's a brief summary of that thread. CLight entities that are not allocated a targetname will be removed on Spawn(). However the ones that are, will remain present so they can be toggled. The problem is, there is some piece of data in the map regarding spawnflags and targetname which we cannot access which is preventing us from individually switching off lights, even if you prevent them from being removed.
If your reaching the maximum entity count, then your probably doing something not so good
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-28-2014 , 10:21   Re: Triggered light question
Reply With Quote #3

Ive already read that thread and also i searched it.
You misunderstand me...

You told me right now what i already know. The thing is that i dont want to do anything with the light entities what doesnt have target name. I want to remove the ones who already have to target name and then somehow switch that removed light on/off without entity.

Thats what im trying to do right now.
.Dare Devil. is offline
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 07-28-2014 , 11:19   Re: Triggered light question
Reply With Quote #4

Quote:
Originally Posted by .Dare Devil. View Post
What i wish to do is remove all entity lights to gave more entity slots
Well it makes it easier that you wrote the correct thing this time. In that case you can just use spawnflags but if you remove the entity then no you can't use it again.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 07-28-2014 at 11:22.
hornet 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 12:54.


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