randomkeyhits Posted October 8, 2014 Share Posted October 8, 2014 I'm slowly getting to grips with the game engine and seeing how far I can go with just LUA, so plenty of learning opportunities! I'm looking at how to implement all the functionality I need for an RPG and decided the latest bit was worth sharing. This allows you to control where on the map the player is positioned when the map is loaded. I created TriggerChangeMapPos.lua which accepts a second optional parameter, a target object. If this is not specified then the saved player position is used as previously so this could be used as a drop in replacement for the original TriggerChangeMap.lua I then updated App.lua so that it created an entity list on map load and then searched for the specified entity and copied its location to the players. Pivots are of course excellent for this kind of purpose. The files are TriggerChangeMapPos.lua App.lua 1 Quote content over form, game play over all. Link to comment Share on other sites More sharing options...
gamecreator Posted October 8, 2014 Share Posted October 8, 2014 Thanks for sharing these! 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.