Elementargewalt Posted July 11, 2020 Share Posted July 11, 2020 Hey there, i want to expand the killing animations used by said mod, but i don´t know how, since i´m a noob when it comes to scripting.As an example i want to make it so, that every weapon type uses it´s own unique killing animation- by default there are only four animations. For instance, the neck breaking animation plays regardless if you are unarmed or got a baton in your hands- looks very dumb. And while the knife stabbing looks good on short blades, a two-handed sword does not fit the animation set very well, so it could use another "blunt-weapon" related one...i´ve created a few sets of paired idles and wanted to add them to the main script, but adding a new property gives me an error message.This is what the script source looks like: Scriptname FST:FST_MainQuestScript extends Quest ConditionalGroup Actors Actor Property PlayerREF autoEndGroupGroup Factions Faction Property FST_SneakKillFaction autoEndGroupGroup Globals GlobalVariable Property FST_Notifications auto GlobalVariable Property FST_Knockout autoEndGroupGroup Keywords Keyword Property AnimsStabWeapon auto Keyword Property WeaponTypePistol auto Keyword Property WeaponTypeRifle auto Keyword Property WeaponTypePlasma auto Keyword Property WeaponTypeGaussRifle auto Keyword Property WeaponTypeLaser autoEndGroupGroup PairedIdles Idle Property FST_NeckBreak auto Idle Property FST_StabNeck auto Idle Property FST_PistolButtKill auto Idle Property FST_RifleButtKill autoEndGroupGroup Perks Perk Property FST_TakedownPerk auto Perk Property FST_SneakSkill auto Perk Property Sneak01 auto Perk Property Sneak02 auto Perk Property Sneak03 auto Perk Property Sneak04 auto Perk Property Sneak05 auto Perk Property MisterSandman01 auto Perk Property MisterSandman02 auto Perk Property MisterSandman03 autoEndGroupGroup Quests Quest Property FST_Pacify auto Quest Property FST_ResetHostiles autoEndGroupKeyword RSEII_PlayerCaptiveBool WarnRSE = FalseBool NoKill = FalseBool Property BlockKills auto conditionalBool Property IsSneaky auto conditionalBool Property IsSandman auto conditionalBool KnockoutInstalled = FalseEvent OnQuestInit() RegisterForRemoteEvent(PlayerREF,"OnPlayerLoadGame") RegisterForRemoteEvent(PlayerREF,"OnEnterSneaking") CheckPerk() CheckSneakPerks() CheckRSE() CheckKnockout() RegisterForExternalEvent("OnMCMSettingChange|Flashy_StealthyTakedowns", "OnMCMSettingChange")EndEventFunction OnMCMSettingChange(string modName, string id) If modName == "Flashy_StealthyTakedowns" If id == "takedownkey" If KnockoutInstalled == True Debug.Notification("Stealthy Takedowns Hotkey Updated.") Else Debug.Notification("Knockout Framework is not installed.") Endif Endif EndifEndFunctionEvent OnControlDown(string control) If control == "takedownkey" If KnockoutInstalled == True If FST_Knockout.GetValueInt() == 0 FST_Knockout.SetValueInt(1) Debug.Notification("Stealthy Takedowns: Knockout Targets") Else FST_Knockout.SetValueInt(0) Debug.Notification("Stealthy Takedowns: Kill Targets") Endif Else Debug.Notification("Knockout Framework is not installed.") Endif EndifEndEventEvent Actor.OnPlayerLoadGame(actor akSender) RegisterForRemoteEvent(PlayerREF,"OnEnterSneaking") CheckPerk() CheckSneakPerks() CheckRSE() CheckKnockout() RegisterForExternalEvent("OnMCMSettingChange|Flashy_StealthyTakedowns", "OnMCMSettingChange")EndEventFST_MainQuestScript Function GetScript() Global return (Game.GetFormFromFile(0x00000F99, "Flashy_StealthyTakedowns.esp") as Quest) as FST_MainQuestScriptEndFunctionFunction CheckPerk() If !PlayerREF.HasPerk(FST_TakedownPerk) PlayerREF.AddPerk(FST_TakedownPerk) EndifEndFunctionFunction CheckRSE() If Game.IsPluginInstalled("RSE_II_CSA.esp") RSEII_PlayerCaptive = Game.GetFormFromFile(0x000026AA ,"RSE_II_Resources.esm") as Keyword If WarnRSE == False Debug.MessageBox("<p align='justify'>RSE II Combat Surrender and Abductions has been detected as installed. Stealthy Takedowns will be disabled during Player Abduction events to prevent breaking functions within the abduction.") WarnRSE = True Endif EndifEndFunctionFunction CheckKnockout() If Game.IsPluginInstalled("Knockout Framework.esm") KnockoutInstalled = True Else KnockoutInstalled = False EndifEndFunctionFunction Assassinate(actor akTarget) FST_Pacify.Stop() FST_Pacify.Start() PlayerREF.SetGhost(true) PlayerREF.DrawWeapon() PlayerRef.StartSneaking() Actorbase Killed = akTarget.GetBaseObject() as ActorBase Int KilledLevel = Killed.GetLevel() Game.ForceThirdPerson() Utility.Wait(0.25) If PlayerREF.WornHasKeyword(AnimsStabWeapon) PlayerREF.playIdleWithTarget(FST_StabNeck,akTarget) Utility.Wait(2) Elseif PlayerREF.WornHasKeyword(WeaponTypePistol) PlayerREF.playIdleWithTarget(FST_PistolButtKill,akTarget) Utility.Wait(2) Elseif PlayerREF.WornHasKeyword(WeaponTypeRifle) || PlayerREF.WornHasKeyword(WeaponTypePlasma) || PlayerREF.WornHasKeyword(WeaponTypeGaussRifle) || PlayerREF.WornHasKeyword(WeaponTypeLaser) PlayerREF.playIdleWithTarget(FST_RifleButtKill,akTarget) Utility.Wait(2) Else PlayerREF.playIdleWithTarget(FST_NeckBreak,akTarget) Utility.Wait(3) Endif If FST_Knockout.GetValueInt() == 1 && KnockoutInstalled == True KoFrameworkFunctions.KnockOutActor(akTarget, PlayerREF, False) Else If NoKill == False akTarget.KillSilent(None) Else akTarget.KillSilent(None) Endif Endif Game.RewardPlayerXP((KilledLevel * 3), false) Utility.Wait(0.25) PlayerRef.StartSneaking() Utility.Wait(0.5) Game.ForceFirstPerson() PlayerREF.SetGhost(False) FST_SneakKillFaction.SetPlayerEnemy(False) FST_Pacify.Stop() FST_ResetHostiles.Start() While !FST_ResetHostiles.IsRunning() Utility.Wait(0.5) EndWhile FST_ResetHostiles.Stop()EndFunctionEvent Actor.OnEnterSneaking(actor akSender) If Game.IsPluginInstalled("RSE_II_CSA.esp") && PlayerREF.HasKeyword(RSEII_PlayerCaptive) BlockKills = True Return Else BlockKills = False Endif If IsSneaky == False || IsSandman == False CheckSneakPerks() Endif If PlayerREF.HasPerk(Sneak04) If NoKill == False NoKill = True Endif PlayerREF.AddPerk(FST_SneakSkill) If FST_Notifications.GetValueInt() == 1 Debug.Notification("Enhanced Stealh Mode On.") Endif StartTimer(2,100) EndifEndEventFunction CheckSneakPerks() If PlayerRef.HasPerk(Sneak01) || PlayerRef.HasPerk(Sneak02) || PlayerRef.HasPerk(Sneak03) || PlayerRef.HasPerk(Sneak04) || PlayerRef.HasPerk(Sneak05) IsSneaky = True Endif If PlayerRef.HasPerk(MisterSandman01) || PlayerRef.HasPerk(MisterSandman02) || PlayerRef.HasPerk(MisterSandman03) IsSandman = True EndifEndFunctionEvent OnTimer(int TID) If TID == 100 If PlayerREF.IsSneaking() StartTimer(2,100) Else PlayerREF.RemovePerk(FST_SneakSkill) If FST_Notifications.GetValueInt() == 1 Debug.Notification("Enhanced Stealh Mode Off.") Endif CancelTimer(100) Endif EndifEndEventIdle Property FST_NonLeathalUnarmedTakedown Auto ConstIdle Property FST_NonLeathalUnarmedTakedown Auto Const So, can anybody tell me, how to get additional idles to work just like the default ones? Can´t be that hard i guess.. Thanks in advance Link to comment Share on other sites More sharing options...
Recommended Posts