Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] Can you keep an NPC permanently active on another map or the same map with ```me->setActive(true);``

[DiscordArchive] Can you keep an NPC permanently active on another map or the same map with ```me->setActive(true);``

[DiscordArchive] Can you keep an NPC permanently active on another map or the same map with ```me->setActive(true);``

rektbyfaith
Administrator
0
07-13-2025, 03:02 AM
#1
Archived author: Crane • Posted: 2025-07-13T03:02:50.347000+00:00
Original source

Can you keep an NPC permanently active on another map or the same map with ```me->setActive(true);```?

The problem is: I have an announcer NPC (in the capital cities) that you click on and that tells you when the next event will take place. This works, but there's a catch: The status is only updated if a player was or is active in the area.

The event NPC has the ```me->setActive(true);``` included locally, along with all the other relevant NPCs, but unfortunately, there's no update for the announcer until a player actually activates the grid.

Is there a solution?
rektbyfaith
07-13-2025, 03:02 AM #1

Archived author: Crane • Posted: 2025-07-13T03:02:50.347000+00:00
Original source

Can you keep an NPC permanently active on another map or the same map with ```me->setActive(true);```?

The problem is: I have an announcer NPC (in the capital cities) that you click on and that tells you when the next event will take place. This works, but there's a catch: The status is only updated if a player was or is active in the area.

The event NPC has the ```me->setActive(true);``` included locally, along with all the other relevant NPCs, but unfortunately, there's no update for the announcer until a player actually activates the grid.

Is there a solution?

rektbyfaith
Administrator
0
07-13-2025, 07:01 AM
#2
Archived author: Alistar • Posted: 2025-07-13T07:01:36.884000+00:00
Original source

yeah, for your case don't setActive the npc and don't update the status inside the npc script. It would be nice if you provided the code.
rektbyfaith
07-13-2025, 07:01 AM #2

Archived author: Alistar • Posted: 2025-07-13T07:01:36.884000+00:00
Original source

yeah, for your case don't setActive the npc and don't update the status inside the npc script. It would be nice if you provided the code.

rektbyfaith
Administrator
0
07-13-2025, 07:06 AM
#3
Archived author: Northstrider • Posted: 2025-07-13T07:06:05.370000+00:00
Original source

We don't share clients here and we also don't search for you. The safest way would be getting an original disk and manually patching it up.
rektbyfaith
07-13-2025, 07:06 AM #3

Archived author: Northstrider • Posted: 2025-07-13T07:06:05.370000+00:00
Original source

We don't share clients here and we also don't search for you. The safest way would be getting an original disk and manually patching it up.

rektbyfaith
Administrator
0
07-13-2025, 07:09 AM
#4
Archived author: Northstrider • Posted: 2025-07-13T07:09:15.528000+00:00
Original source

SetActive can only be used when the npc has been loaded at least once, so the grid cell needs to be loaded. This usually happens when a player gets there for the first time.

So to trigger a grid load, you either have to visit the npc or invoke the according map method
rektbyfaith
07-13-2025, 07:09 AM #4

Archived author: Northstrider • Posted: 2025-07-13T07:09:15.528000+00:00
Original source

SetActive can only be used when the npc has been loaded at least once, so the grid cell needs to be loaded. This usually happens when a player gets there for the first time.

So to trigger a grid load, you either have to visit the npc or invoke the according map method

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)