Jump to content

hi im looking for a certain script


Recommended Posts

This may work. I've not tried it. There are other possible methods as well. This could go on the creature itself, it could go on a quest, the player alias.... etc

 

 

Actor Property Creature Auto
Float Property TimeToWaitInDays Auto ;where 1.5 equals 1.5 days
Float StartTime
Float EndTime
 
Event OnInit()
  StartTime = Utility.GetCurrentGameTime()
  EndTime = StartTime + TimeToWaitInDays
  While Utility.GetCurrentGameTime() < EndTime
    ;do nothing
  EndWhile
  If Utility.GetCurrentGameTime() >= EndTime
    Creature.Disable()
  EndIf
EndEvent

 

 

Link to comment
Share on other sites

thanks ill test it out cause the mod im working on is a type of creature breeding mod that require a creature to spawn when 2 or mor of the same creature i designate are male and female are in the area. it would cause an effect that would then spawn a baby of the creature and then after a certain time it would despawn. which would intern cause a new creature say a young adult version to spawn then after some time it would despawn and then i would get a final adult creature that would stay until killed

Edited by tcain99
Link to comment
Share on other sites

For best results, I think this should go on each creature in your chain of growth sequence except for the last one.

 

 

Actor Property SelfCreature Auto
Actor Property NextCreature Auto
Float Property TimeToWaitInDays Auto ;where 1.5 equals 1.5 days
Float StartTime
Float EndTime
 
Event OnInit()
	StartTime = Utility.GetCurrentGameTime()
	EndTime = StartTime + TimeToWaitInDays
	While Utility.GetCurrentGameTime() < EndTime
		;do nothing
	EndWhile
	If Utility.GetCurrentGameTime() >= EndTime
		SelfCreature.Disable()
		SelfCreature.Delete()
		NextCreature.Enable()
	EndIf
EndEvent 

 

If you are using the same base creatures in multiple locations you can assign the script to the bases and pre-fill the properties with your standard values, then on the references make any tweaks as necessary to the property values.

Link to comment
Share on other sites

you are awesome i am still new to scripting thank you for your help man i was afraid i was going to have to stop my mod project your a life saver(Mod Saver) :smile:

 

 

 

now one last thing i need to ask i have it set up that a dragon eg hatches and spawns a dragon hatchling now how do i attah this script to that hatchling which then goes onto the next stage or do i set it up that the hatchling is linked to the egg so when the egg spawns the hatchling appears?

 

 

i used the base script from the spider eggs from the dragonborn dlc that spawns albino spiders and made it so that it spawns a dragon hatchling instead do i atach this to the egg or the hatcling that isnt there yet

Edited by tcain99
Link to comment
Share on other sites

  • Recently Browsing   0 members

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