Lapsio Posted February 21, 2018 Posted February 21, 2018 I'm trying to assign AI package at the end of Lovers animation but it seems to not work. I think it might be due to Lovers overriding ai package at the end of scene or Lovers animation is Interrupt type of package (which can't be replaced by addScriptPackage). So I think the easiest solution would be to delay script by few seconds so that Lovers ends everything and then I call addScriptPackage. I'm basically modifying LoversCalm post-sex trigger and have no idea what I'm doing, few hours ago I opened TES CS for the first time in my life :V I'd like to give 5% chance of creature to follow you if its disposition is 100 but well it doesn't work. When I execute addscriptpackage from console when creature is idling then it works correctly so it seems to be some overriding clash. This is what I have for now: scn xxxLCCalmTarget short trg ref offence ref defence short flag float num float nper float advchance float offdisp Begin Function { trg offence defence flag } if flag return endif Set num to ((defence.GetAV Personality / 6) + (offence.GetAV Aggression / 2)) Set offdisp to offence.GetDisposition defence Set advchance to Rand 0 100 Set nper to defence.GetAV Personality + 1 PrintToConsole "[LoversCalm] advchance: %f disp: %f mod: %f" advchance offdisp num if nper < 100 && advchance < 5 PrintToConsole "personality up" defence.SetAV Personality nper endif if offdisp < 100 PrintToConsole "[LoversCalm] disposition gain %f" num offence.Moddisposition defence num else if advchance < 10 PrintToConsole "[LoversCalm] follower package added" offence.AddScriptPackage 0009e69b defence.SetAV Personality nper endif endif End
TDA Posted February 21, 2018 Posted February 21, 2018 I would create a new quest (with quest-script), with REF variable - the actor that your function supplied. ==== in function - else if advchance < 10 PrintToConsole "[LoversCalm] follower package added" set NEWQUEST.ActorfromFunction to offence defence.SetAV Personality nper endif ====NEWQUEST scn QuestScript ref ActorFromFunction begin gamemode if ActorFromFunction if ActorFromFunction.GetIsActor==1 && ActorFromFunction.GetDead==0 && ActorFromFunction.GetRestrained==0 ActorFromFunction.AddScriptPackage 0009e69b else set ActorFromFunction to 0 endif set ActorFromFunction to 0 endif end
Recommended Posts
Archived
This topic is now archived and is closed to further replies.