Help with your scripting

Set Specular or Diffuse Colour at Run Time

Set Specular or Diffuse Colour at Run Time

Postby Shando » 27 Sep 2017, 07:12

Hi All,

Is there any way to set the Specular or Diffuse Colour of a Material at Run Time, or do I have to create multiple Model/Material combinations beforehand?

Basically, I want to highlight certain areas of my map with different colours (the map is made up of 6 different Models), but only at the beginning of the game. After the first round, I need to revert all of the Materials back to their original state.

Thanks in advance

Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Set Specular or Diffuse Colour at Run Time

Postby SpiderMack » 27 Sep 2017, 09:03

Good one.

I also would want the ability to change some material attribute at runtime, mainly modifying some color value to customize some character clothes or items.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Set Specular or Diffuse Colour at Run Time

Postby SolarPortal » 28 Sep 2017, 10:30

StarFire has mentioned that she will be doing this soon as she also has required to be able to edit the material through lua. Plus it just makes sense :)
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 Lua Scripting

Who is online

Users browsing this forum: No registered users and 6 guests

cron