Is there any way, entities or the player emmit own light?

User avatar
Drachenbauer32
Member
 
Posts: 98
Joined: Wed Aug 28, 2019 18:11

Is there any way, entities or the player emmit own light?

by Drachenbauer32 » Mon Nov 04, 2019 22:13

As i played the Rovio-Game "Fruit-Nibblers".
The main-character there is Coral, an Anglerfish with a light-antenna on the head.

So i got an idea:
How about making the player or entities generate their own light.
this maybe great for cave-exploring.

Is there any way to realize this?
 

User avatar
Pyrollo
Member
 
Posts: 324
Joined: Mon Jan 08, 2018 15:14
Location: Paris
GitHub: pyrollo
In-game: Naj
 

User avatar
Drachenbauer32
Member
 
Posts: 98
Joined: Wed Aug 28, 2019 18:11

Re: Is there any way, entities or the player emmit own light

by Drachenbauer32 » Tue Nov 05, 2019 21:01

i want to integrate the light directly to a specific player-character, that i´m creating, not as a wielded item.
It should be a minetest-blocky-version of the character, i told about in the start-post.
Last edited by Drachenbauer32 on Sun Nov 10, 2019 16:27, edited 2 times in total.
 

User avatar
runs
Member
 
Posts: 897
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: Is there any way, entities or the player emmit own light

by runs » Tue Nov 05, 2019 23:42

No :-(
Hammet's Banshee emits light. But it do not move and the light was done lighting surrounding air. It could be done even the entity moving, but the cost of calculations would be probably very high. There is a lantern mod indeed.

It should be a engine feature (C coded)
 

Eran
Member
 
Posts: 87
Joined: Fri May 03, 2019 16:46

Re: Is there any way, entities or the player emmit own light

by Eran » Wed Nov 06, 2019 09:49

Drachenbauer32 wrote:i want to integrate the light dierectly to a specific plaxer-character, that i´m creating, not as a wielded item.
It should be a minetest-blocky-version of the character, i told about in the start-post.


The way that mods creates light at the player's position doesn't require it to be bound to a wielded item. Basically it works by continually placing invisible glowing blocks at the player's position, which are removed when the player is no longer there.
Still, it would be much nicer as an engine feature.
 

User avatar
Pyrollo
Member
 
Posts: 324
Joined: Mon Jan 08, 2018 15:14
Location: Paris
GitHub: pyrollo
In-game: Naj

Re: Is there any way, entities or the player emmit own light

by Pyrollo » Wed Nov 06, 2019 14:37

Drachenbauer32 wrote:i want to integrate the light dierectly to a specific plaxer-character, that i´m creating, not as a wielded item.
It should be a minetest-blocky-version of the character, i told about in the start-post.


You can use it your own way. I used it in LATE for glow effect (working on players and mobs).
[ Display Modpack ] - [ Digiterms ] - [ Crater MG ] - [ LATE ]
 

User avatar
Drachenbauer32
Member
 
Posts: 98
Joined: Wed Aug 28, 2019 18:11

Re: Is there any way, entities or the player emmit own light

by Drachenbauer32 » Sun Nov 10, 2019 16:57

Where do i find the lua-code for the movement of the player?
I find no other way zu syncronize the light-update with the player´s movement.
 

User avatar
Drachenbauer32
Member
 
Posts: 98
Joined: Wed Aug 28, 2019 18:11

Re: Is there any way, entities or the player emmit own light

by Drachenbauer32 » Mon Nov 11, 2019 15:31

I look into the wielded light.

There i find a light update-function and a light-helper-node.
How can i separate them from the wielded item and use them directly in the api.lua from my character?

Edit:

I noticed, that i already created a working light for my character now.
i copyed parts from the wielded light mod into the api.lua from the player_api-mod for this character.
And i made a little change in a function-call.
Nuw i made the first test of this character in the game, and as i entered a dark hole in the ground, i noticed, that ihm surrounded by a sphere of light now.

So it´s finished now.
No more questions about character-light yet.
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 4 guests