Jump to content

Home

Spawn NPCs when entering module?


HodgePodge

Recommended Posts

I've been trying to spawn a group of NPCs every time I enter a module, but I can't get it to work. I was thinking that using the OnEnter script would be best, but this is a custom module, and I have no idea how to do so. Any help appreciated!

Link to comment
Share on other sites

You probably need to start a new game when you go to an updated custom module. I've had this trouble before, and that may be what's wrong.

 

I don't think I was being specific enough. It's not that my changes don't have an effect, it's that I don't know how to make the changes.

Link to comment
Share on other sites

I've been trying to spawn a group of NPCs every time I enter a module, but I can't get it to work. I was thinking that using the OnEnter script would be best, but this is a custom module, and I have no idea how to do so. Any help appreciated!

 

You set the name of the OnEnter event script (without the .ncs extension) of an area in the areaname.are file which should be in the RIM or MOD file that contain the module data. You can edit that file with a GFF editor, the field is called OnEnter.

 

 

(areaname is the name of the area layout used, for example 003ebo for the Ebon Hawk in TSL --> 003ebo.are)

 

Keep in mind that OnEnter event scripts are run whenever any creature enters the area. This includes the player character, party members and any NPCs or monsters that get spawned. Including any NPCs you spawn within the OnEnter script itself. So you generally want to make sure it only triggers when the player character enters.

Link to comment
Share on other sites

You set the name of the OnEnter event script (without the .ncs extension) of an area in the areaname.are file which should be in the RIM or MOD file that contain the module data. You can edit that file with a GFF editor, the field is called OnEnter.

 

 

(areaname is the name of the area layout used, for example 003ebo for the Ebon Hawk in TSL)

 

Keep in mind that OnEnter event scripts are run whenever any creature enters the area. This includes the player character, party members and any NPCs or monsters that get spawned. Including any NPCs you spawn within the OnEnter script itself. So you generally want to make sure it only triggers when the player character enters.

 

What if I used the .git file to add NPCs to the area, would they be affected by the OnEnter script?

Link to comment
Share on other sites

What if I used the .git file to add NPCs to the area, would they be affected by the OnEnter script?

 

If you mean pre-placed NPCs triggering the OnEnter event script of the area they shouldn't do that, since they are already in the area. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...