Moving NPC with Light Source.

Hello fellow RPG Maker game developers.

I got a question but i am not sure i am in the right part of the forum.
Anyways.

I am trying to get an NPC and MOB that are moving around as an Event to have an light source that follows them while they are moving around in random.
How to make it work with a classic script?

I have tried to use the "Khas Awesome Light Effects" lantern style, but without progress.

l = $game_map.lantern
l.change_owner($game_player)
l.set_graphic("torch_m")
l.set_opacity(180,30)
l.show
 

But i don't know how to make it work with an "EVENT / NPC / MOB" that moves around.

I wonder if i could change the "l.change_owner($game_player)" to an "Event" which is an moving "NPC / Enemy / MOB"

Any help wo make it work would be superb.

Thanks in advance!

-- Taurus1979
I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.


Nope, wrong place. Scripts is for completed scripts that you're sharing. Script Requests is for asking for scripts. Script Support (under the support forum section) is for asking for help with scripts.


Do you want it to actually be positioned WHERE the player is, or do you want it to somehow FOLLOW the player (trail a distance behind)? And if you have several events, you'll need several light sources, won't you? I'm not sure if MOB is just a group of people or monsters, or if it's an acronym for something.
Let me put it this way.

There's a moving NPC in the dark which you can't see if not there's a light source that's attached to the NPC whitch is moving with the NPC while moving around.
The NPC can also be a MOB / Enemy moving around in the darkness of an labyrinth or a dungeon.

Yes, i need to have a bunch of light sources on the same map at once in different locations and on Enemies which are turned off then killed.

That is what i am looking for.

Original thread: https://forums.rpgmakerweb.com/threads/moving-npc-with-light-source.23437/