HurricainReaperProductions Posted June 11, 2014 Share Posted June 11, 2014 hi im looking for a script that when you wait a few days a spawned creature despawns that is what im looking for im working on a mod that needs a script like that where you dont have to kill the creature to make it despawn like a corpse. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 11, 2014 Share Posted June 11, 2014 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 More sharing options...
HurricainReaperProductions Posted June 11, 2014 Author Share Posted June 11, 2014 (edited) 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 June 11, 2014 by tcain99 Link to comment Share on other sites More sharing options...
HurricainReaperProductions Posted June 15, 2014 Author Share Posted June 15, 2014 do you think there is a way you could help me again i need to alter this script and make it so when the despawn happens a new one spawns in its place. please let me know if you have any ideas Link to comment Share on other sites More sharing options...
IsharaMeradin Posted June 16, 2014 Share Posted June 16, 2014 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 More sharing options...
HurricainReaperProductions Posted June 16, 2014 Author Share Posted June 16, 2014 (edited) 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 June 16, 2014 by tcain99 Link to comment Share on other sites More sharing options...
Recommended Posts