From time to time we will inform the community of certain areas of Skyline Development. If we have decided to add a new features or new demos in development etc we will try to make a post in this topic.Feel free to leave your comments to help encourage out development team ; )

Multi Dynamic Properties per entity

Multi Dynamic Properties per entity

Postby SolarPortal » 10 May 2017, 12:56

Hi,

So past couple of days, we have been working on the ability to have multiple dynamic properties per entity.
This will allow an entity to have an external script and micro script simultaneously and have adjsutable properties for each one either in editor or at runtime.

We have added this feature because at some point, we will add the ability to add multiple external scripts or actions to the same entity as at the moment, you can only have 1 of each as the property names have to be unique.

However, this enhancement currently does allow the microscripts and externals to have their own editable dynamic properties
Each of the headers is collapsable like a toolbox, so you can edit only 1 sheet or multiple at the same time.

Check out the image below to see:
Multi_Dynamic Property.jpg
Multi_Dynamic Property.jpg (29.47 KiB) Viewed 2751 times


Its added a couple days to the core upgrade, but we encountered an error when working on a game mechanic that stopped the development and this needed added.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Multi Dynamic Properties per entity

Postby SolarPortal » 10 May 2017, 22:23

we had to add a couple extra global bits to a lua script to work with multiple dynamic properties since a script can be added in different orders; it would be hard to know the id of which dynamic property we would need to have.

So there is a new global variable and a new global function and they can be used as such.

Code: Select all
-- ===================================================================
-- internal_scriptID -- this is the variable stored in all scripts.
-- Defaulted to 0 if no scriptID is passed to the script, but if there is then it changes
-- ===================================================================
-- getInternalScriptID() -- this function retrieves the variable above and allows scripts to be
-- easily reused in any orders they could be placed.
-- ===================================================================


The scriptID is unique to the entity, so 2 entities could have a script ID of 0 or 1(or any other number lol :P). It is just to differentiate between the scripts on an entity.

Edit: Removed part of the code as it is now automated on the calls for getDynamicProperty() and setDynamicProperty() to grab the correct scriptID. Therefore no code changes required in order to use the new system :) Woop! Completed! :D
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Skyline Development

Who is online

Users browsing this forum: No registered users and 8 guests

cron