Alienhead Posted March 19, 2022 Share Posted March 19, 2022 This is a screenshot of from a project I was working, you'll notice I have cubes with different things on them to tell me in the game engine where to do stuff at, like fish spawn location, 3d sound, etc..etc.. My question is - I'm looking for a way to cycle through the objects in a map that is loaded with Loadmap() in LE. I need to be able to detect specials nodes Im going to lay down. I wasn't able to find anything in the docs about this or defining flags to certain objects/entites in the map itself. I know its bound to be possible but the forum searches I did find regarding this lead to 404's. Screenshot: https://ibb.co/Kqtwx8m Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Thirsty Panther Posted March 20, 2022 Share Posted March 20, 2022 Sounds like you want "GetKeyValue". https://www.leadwerks.com/learn?page=API-Reference_Object_Entity_GetKeyValue You may also want to check out triggers. If I understand correctly you have these points/areas in your game when a player gets near it triggers an event. Be it a sound, enemy spawn or visual effect. Have a look at the Marble game tutorial for examples. Another good resource is BluHornets YouTube channel. The scripts are old and may need some modification to get to work with the latest LW but the ideas are still solid. 1 Quote Link to comment Share on other sites More sharing options...
Alienhead Posted March 20, 2022 Author Share Posted March 20, 2022 You are dead on with the GetKeyValue advice. I suppose setting a specific name for like fish spawning point etc.. I could call the marker/entity fspawn etc.. My only problem is I need to set the information of these emitter/spawners inside the LE map editor then be able to retrieve them back after Loadmap has been preformed. I don't really want to tag a script to them for speed reasons, i could have 100's of these node types on a single map. Theres no way to set special or custom flag / data keys inside the LE editor which get saved to the map format and can be gathered in the game engine via GetKeyValue ?? Hmmm thinking about it deeper, I suppose I could always name/label the entity inside the editor like SpawnType/1/otherdata..... etc then get that name via ( GetKeyValue ) then parser it. 1 Quote I'm only happy when I'm coding, I'm only coding when I'm happy. 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.