Space Engineers

Space Engineers

Not enough ratings
Custom Emissive Example
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Block, Script
File Size
Posted
Updated
1.506 MB
7 Apr, 2016 @ 10:07am
24 Oct, 2016 @ 8:03pm
3 Change Notes ( view )

Subscribe to download
Custom Emissive Example

Description
This is an example of how to use the new custom emissives in SE 01.129.
For more details, see: http://forums.keenswh.com/threads/custom-entity-emissives.7382350/

To use emissives:
1) Model as usual in any editor, and create emissive textures with any name you want (You can use Emissive, Emissive0, etc... if you want, but you don't have to).
2) In ModAPI, call IMyEntity.SetEmissiveParts("NameOfEmissiveTexture", Color, brightness);

This also works with stock emissives! It also works with everything! Blocks, floating entities, and should work for weapons and the character too!

Code doc:
void SetEmissiveParts(string emissiveName, VRageMath.Color emissivePartColor, float emissivity)
Member of VRage.ModAPI.IMyEntity

Summary:
Sets the emissive value of a specific emissive material on entity.

Parameters:
emissiveName: The name of the emissive material (ie. "Emissive0")
emissivity: Level of emissivity (0 is off, 1 is full brightness)
emissivePartColor: Color to emit
7 Comments
KitsuneKas 16 Apr, 2016 @ 11:11pm 
Nice. Good to hear. Dunno if that helps, seeing as I'm not a modder myself, but I do make a point of trying to understand what is and isn't possible before I go to mod authors whining about "moar lazors plox" and so forth.

Gwindalmir  [author] 16 Apr, 2016 @ 9:19pm 
@KitsuneSamurai, Assuming the conveyor system is allowed in the ModAPI, yes.
KitsuneKas 16 Apr, 2016 @ 7:59pm 
Does this finally allow for things like lights on conveyors, for all the conveyor expansions out there that use the conveyor blocks and therefore don't have lights like the tubes?
Mage4 11 Apr, 2016 @ 6:36pm 
nice
DonCDXX 8 Apr, 2016 @ 9:43am 
Thank you. I just started researching how to do this yesterday. What perfect luck.
Gwindalmir  [author] 8 Apr, 2016 @ 9:37am 
I wrote it.
Alden Badham 8 Apr, 2016 @ 7:20am 
Thanks Phoenix for this discover ! Now we can use it to change texture with scripting. How did you find it ?