Jump to content

They only come out at night


ozzgarth

Recommended Posts

I was working on my mod, and I thought, "how cool would it be if these creatures only came out at night." the only problem is though, how could I do such a thing? All hope lost, I turned to the forums for help... So, my question is: How do I make creatures spawn in the night and disappear when the sun comes up?

 

If anybody knows how to achieve this, please tell me, I would be oh so grateful and you would get a spot on the mod's credits.

 

Thanks,

 

-Ozzgarth

Link to comment
Share on other sites

Well, one way you could do it is having them all go somewhere at night, instead of simply being disabled. You could make like, a den or something, then have one sandbox package for the daytime, and one for the night. Then set the day location to something like 'editor location' so they stand where you play them in the geck, and the nighttime one could be in the lair you created.

 

One question though, are these creatures all around the vanilla Mojave, or are they just in some area you have created?

Link to comment
Share on other sites

"So, my question is: How do I make creatures spawn in the night and disappear when the sun comes up?

-Ozzgarth

GetCurrentTime

 

Use a quest script to watch for the time. Then you'd have to discover a way to disable all the creatures and enable them. It would be either very large and tedious, or there may be an easier way using NVSE (New Vegas Script Extender) which i am not familiar with.

 

You could use quest stages that never complete to determine the spawns using the result script. If you do not understand I will re-explain but i gtg right now.

Edited by Skibblets
Link to comment
Share on other sites

I am new to scripting. But, the few scripts I have worked on that gives me an idea to help with your issue. Sorta combine Skibbles and AJV's ideas. Instead of a 'den' have a seperate world space. A parking location for the critters. Sorta like what the game does with all the merchant containers. Using the GetCurrentTime shows that it is "Zero Hour" . Just use a simple moveto command to move the critters to the holding pen. Then another to move then back to out into the Mojave.
Link to comment
Share on other sites

Ok... so I think this is a possibility.

 

2 things might be wrong with this script.

 

#1 after disabling an object idk if the script stops working, so it may not re-enable the creature.

 

#2 if you replaced the enable/disable with a ".moveto" (you would need to make a holding cell with a trigger that will increase the health of everything in it in cause the creatures want to attack each other, thus spawning tons of dead creatures across the wasteland when you hit daytime... or something like that, idk if they will when the player isn't in the cell... You could always make different holding cells, or temporarily add the creatures into 1 friendly faction. ANYWAYS...

 

This is untested, test it urself :P

 

BTW:

Why would you disable instead of move them? Because there is just too many creatures!? lmao.

 

Here is a script you may use. I made it myself <3

 

Since most creatures dont have scripts, (unless they are special) then just put this script on their base object...

SCN OnlyAtNight

; Declarations
ref MySelf
set MySelf to GetSelf

; Run during gameplay
Begin GameMode

if ( GetCurrentTime > 18.00 ) && ( GetCurrentTime < 6.00 ) ; Current time is after 6pm and before 6am
MySelf.disable
else
MySelf.enable
endif

End

Link to comment
Share on other sites

2 things might be wrong with this script.

#1 after disabling an object idk if the script stops working, so it may not re-enable the creature.

they don't.

at least the script currently processed finishes. for the rest, it depends on the blocktype, e.g. OnLoad won't work (without workarounds anyhow) because there's no 3d-data loaded when it's disabled, or trigger-blocks won't work, for obvious reasons.

but gamemode should work for what i've seen. if you do it with a gamemode script, i'd do it with one enabling parent that enables all of the creatures at one time, so it only has to process one gamemode script instead of one for every single critter.

another way would be to set up a controller quest that enables/disables them at the desired times.

 

or, for a completely different approach, you could just add the creatures an ai-package with fixed running times that makes them go put their heads in a bucket or whatever whenever they're not needed. you could even make them disable themselves by using the packages result script, but you'd have them reawaken them from elsewhere because they won't run no package when disabled. for this one, you wouldn't even have to set up special creatures, could just add them the package by script on the fly

Link to comment
Share on other sites

I do like the den idea, I just think it would be a very difficult task.

 

you would need to find a place for these creatures to go to... and honestly I've rarely ever seen the rad-scorpions going into a cave. and the caves are usually occupied by different creatures. Therefore I thought disabling was the better alternative.

 

Also I recommended the script i wrote to be put on creatures since it was the best alternative. Otherwise you would need to click every creature int he wasteland and link it to 1 single X marker to enable/disable (which they would probably be difficult to find all the ones that are only outside).

Link to comment
Share on other sites

If you're only making a little cave full of them or something you could try this. If you're just using them like a random spawn then this won't work.

 

First make a reference called NightwalkerControl. Something invisible would be good, a rock, whatever.

 

Then make a quest script like

SCN NightwalkerControlScript

Begin GameMode

if ( GetCurrentTime > 18.00 ) && ( GetCurrentTime < 6.00 )
NightwalkerControl.disable
else
NightwalkerControl.enable
endif

End

 

Then set your nightwalkers "Activate Parents" to the NightwalkerControl reference.

 

This will turn off all your nightwalkers when the NightwalkerControl reference is disabed and re-enable them when it is re-enabled.

 

Kind of a ghetto way of doing it, but I can't really think of anything else except the moveto function, and then you have to place markers everywhere for them to return to the proper places.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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