Jump to content

Laying down custom nodes


Alienhead
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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. 

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...