Jump to content

How to make NPC's appear out of nowhere at a certain time of the day


Recommended Posts

  • Replies 82
  • Created
  • Last Reply

Top Posters In This Topic

Take a look at the script of the street lights, it will surely help you.

 

Ok, so my script is a bit buggy, which means that if I am not at the certain cell, by the time they NPC's should appear, they will not appear. This is what I have written:

 

scn ELSJinsAppear
short DoOnce1
begin gamemode
if GameHour >= 5
Disable ELSBattlemageEvilJin.ref
Disable ELSBackAlleyGJin.ref
Disable ELSHunbalSpirit.ref
Disable ELSAlUzzaSpirit.ref
Disable ELSManatSpirit.ref
Disable ELSAlLatSpirit.ref
endif
end
Begin GameMode
If GameHour >= 21
Enable ELSBattlemageEvilJin.ref
Enable ELSBackAlleyGJin.ref
Enable ELSHunbalSpirit.ref
Enable ELSAlUzzaSpirit.ref
Enable ELSManatSpirit.ref
Enable ELSAlLatSpirit.ref
Set DoOnce1 to 1
EndIf
End
So I adjusted an already existing script of the lights and have written this:
scn ELSJinsAppearTest
Begin OnActivate
if GameHour >= 5 && GameHour <= 21
ELSHunbalSpirit.ref disable
ELSAlUzzaSpirit.ref disable
ELSManatSpirit.ref disable
ELSBackAlleyGJin.ref disable
ELSBattlemageEvilJin.ref disable
else
ELSHunbalSpirit.ref enable
ELSAlUzzaSpirit.ref enable
ELSManatSpirit.ref enable
ELSBackAlleyGJin.ref enable
ELSBattlemageEvilJin.ref enable
endif
End

 

And this doesn't work at all.

Link to comment
Share on other sites

What is the player supposed to activate to make the NPC's appear?

 

The player is not supposed to activate anything to make the NPCs appear.

 

But I am thinking of a gate that appears the same time the NPC's appear and disappear the same time that they do, but I am afraid that I won't be able to get put of that world if the gate disappears.

Link to comment
Share on other sites

It seems that your script contains logical error in setting doOnce flag. Enable and Disable commands are completely mismatched.

scn ELSJinsAppear
short DoOnce1

begin GameMode
 
if GameHour >= 5
   if ELSBattlemageEvilJinRef.GetDisabled == 0 ;group of jins is not disabled
      ;disable jin group
      ELSBattlemageEvilJinRef.Disable
      ELSBackAlleyGJinRef.Disable
      ELSHunbalSpiritRef.Disable
      ELSAlUzzaSpiritRef.Disable
      ELSManatSpiritRef.Disable
      ELSAlLatSpiritRef.Disable
      set DoOnce1 to 0 ;reset flag to make appear them at night again
   endif   
endif
   
If GameHour >= 21
   ;is player in same cell as group
   if player.GetInSameCell ELSBattlemageEvilJinRef != 0 && DoOnce1 == 0
      ;yes, so enable whole group
      ELSBattlemageEvilJinRef.Enable
      ELSBackAlleyGJinRef.Enable
      ELSHunbalSpiritRef.Enable
      ELSAlUzzaSpiritRef.Enable
      ELSManatSpiritRef.Enable
      ELSAlLatSpiritRef.Enable
      Set DoOnce1 to 1
   endif
EndIf
 
End 

I'm assuming that jins are grouped in same place, so that's why I checked only one jin(spirit). I made them appear when player arrives at their cell at night too, this should prevent them to accidentaly run away without noticing.

Edited by RomanR
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...