View Single Post
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 07-12-2020 , 22:13   Re: Map light origin
Reply With Quote #5

Quote:
Originally Posted by safetymoose View Post
What i'd like to know is, is there a way to directly retrieve the origin from the light entity itself?

If not, i think i should be looking into the entity lump from OnLevelInit. It has the necessary data, but i have no idea how to properly parse this. I just need the proper "origin" fields for each "light" or similar entity.

Any suggestions?
As i know OnEntityCreated calls too early and you need to wait before you can get entity origin

UPD:

Works perfect
Code:
[test.smx] DEBUG: Entity created: beam_spotlight | Origin: 82.96, 29.19, 28.33
[test.smx] DEBUG: Entity created: light_dynamic | Origin: -16.55, -0.60, 55.96
[test.smx] DEBUG: Entity created: light | Origin: 1132.53, 5624.00, 2521.00
Spoiler
__________________
cry

Last edited by BHaType; 07-13-2020 at 02:40.
BHaType is offline
Send a message via AIM to BHaType