Help with your scripting

Add Material to Entity loaded using Spawn

Add Material to Entity loaded using Spawn

Postby Shando » 15 Mar 2013, 12:29

Hi again,

I was just wondering if there is a command to assign a Material to an Entity that has been created using the Spawn command:

Code: Select all
local x = math.random(-10,10)
local y = math.random(0,10)

id = entity.spawn("Models_octagonS_x",x,y,-20,1,1,1);


The above works great ;)

Now all I need is to be able to add/change the Material attached to it?? Is there a command for this yet?

If not, it's no biggie, as I can always work around it for the time being.

Regards

Shando
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: Add Material to Entity loaded using Spawn

Postby StarFire » 15 Mar 2013, 14:13

sorry mate, currently there is no way to change the material, I will have a look at adding a material command for you in the next release ;)
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Add Material to Entity loaded using Spawn

Postby Shando » 15 Mar 2013, 22:12

G'day NightHawk,

I will have a look at adding a material command for you in the next release


That would be great :P as the game I am looking at creating uses Material overrides quite a lot (much easier than replacing Models all the time IMHO).

Regards

Shando
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


Return to Lua Scripting

Who is online

Users browsing this forum: No registered users and 8 guests

cron