Jump to content

Need a little scripting help


stars2heaven

Recommended Posts

Ive been trying to figure this out for hours. All I want to do is to get a goblin to spawn at a particular time at night for a quest. Ive tried using something in the script like

 

If (GetCurrentTime)==23

goblinref.enable

endif

 

or

 

If (GameHour) == 23

blah, blah

end if

 

Game hour and Current time seem to be exactly the same things, and they refer to real time and not the actual game time. Very frustrating.

 

Ive tried looking at the BlackBrugo quest since it mentions he only shows up there during certain times. I couldnt find any evidence of that being true anywhere though in the actual quest scripts/conditions.

 

Is there a way I could get it to spawn at a particular hour in the game that Im not thinking of?

Link to comment
Share on other sites

have you tried putting 23.00?

 

Not sure if that will help, but you never know... :confused:

Yeah I have no idea why it wasnt working. I tried this line

 

If (GameHour >= 23) || (GameHour < 2)

 

That made it work.

 

I have no idea why that extra bit was necessary

Link to comment
Share on other sites

Ive been trying to figure this out for hours. All I want to do is to get a goblin to spawn at a particular time at night for a quest. Ive tried using something in the script like

 

If (GetCurrentTime)==23

goblinref.enable

endif

On first glance it looks like your syntax is a bit off. Try this:

 

Begin GameMode

If (GetCurrentTime == 23)
    goblinref.enable
endif

End

 

On second glance it should be noted that this will cause the goblin to enable only at exactly 2300 (Or 11 PM) gametime, not 2315 (or 11:15 PM). and he will only spawn if he's in the cell that the character is in.

 

That is why using the extra stuff is necessary, it means that as long as you arrive in the cell anywhere exactly at or after 11PM as long as it is before 2AM the goblin will spawn. Of course if you wanted him to only spawn during the 2300 hour (I.E. not after midnight) it would look like this:

 

Begin Gamemode

If (GameHour >= 23) && (GameHour < 24)
    goblinref.enable
EndIf

End

 

In this particular instance the "(GameHour < 24)" is a bit unecessary as it can't ever go higher, it gives a good reference if you only wanted something to spawn during the 1300 (or 1 PM) hour instead.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...