TEPA6ANT Posted April 19, 2019 Share Posted April 19, 2019 Is it possible to get information from the lighting? I need the enemy to know if the player is sitting in the dark. Without creating a script for each "light" on map. Example in the picture below 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted April 19, 2019 Share Posted April 19, 2019 Why not call forEachentityinAABB..., check for lights, check the light far range, and calculate how bright the model should be based on distance? 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
TEPA6ANT Posted April 19, 2019 Author Share Posted April 19, 2019 Okay. I think I understand. But what if the light point will be outside the AABB, but light radius will reach the player? Quote Link to comment Share on other sites More sharing options...
Josh Posted April 19, 2019 Share Posted April 19, 2019 The command will detect all entities that intersect the bounding box you provide. This includes the light radius. 1 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
TEPA6ANT Posted April 19, 2019 Author Share Posted April 19, 2019 Yes. It works. I thought it wouldn't work. Thanks. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.