RellioN Posted December 3, 2010 Share Posted December 3, 2010 Everything works but one feature, when I try to swap the (initially male) mannequin with the female one that is standing in exactly the same spot only with "initially disabled" active, the game just crashes. (button 1) Any idea is appreciated. scn JVaultMannequinScript short Activated short type short button short Pose short RePose short EndPose short WasPossed Float Timer REF ActorName REF MoveToPos begin OnLoad Set Timer to .1 Set Repose to 1 SetActorsAI 0 SetGhost 1 SetPlayerTeammate 1 end begin OnActivate if IsActionRef Player == 1 && Activated == 0 If GetIsID JVaultMannequinMale == 1 showmessage JVaultMannequinMsgMale set type to 0 else showmessage JVaultMannequinMsgFemale set type to 1 endif endif end Begin GameMode IF GetInSameCell player set button to getbuttonpressed if button == 0 OpenTeammateContainer Set Pose to 2 elseif button ==1 ;Change Mannequin Sex if type == 0 Set WasPossed to 0 Disable If GetIsReference JVaultMannequinMaleREF1 == 1 JVaultMannequinFemaleREF1.Enable removeallitems JVaultMannequinFemaleREF1 Set JVaultMannequinFemaleREF1.Pose to 2 elseIf GetIsReference JVaultMannequinMaleREF2 == 1 JVaultMannequinFemaleREF2.Enable removeallitems JVaultMannequinFemaleREF2 Set JVaultMannequinFemaleREF2.Pose to 2 elseIf GetIsReference JVaultMannequinMaleREF3 == 1 JVaultMannequinFemaleREF3.Enable removeallitems JVaultMannequinFemaleREF3 Set JVaultMannequinFemaleREF3.Pose to 2 elseIf GetIsReference JVaultMannequinMaleREF4 == 1 JVaultMannequinFemaleREF4.Enable removeallitems JVaultMannequinFemaleREF4 Set JVaultMannequinFemaleREF4.Pose to 2 elseIf GetIsReference JVaultMannequinMaleREF5 == 1 JVaultMannequinFemaleREF5.Enable removeallitems JVaultMannequinFemaleREF5 Set JVaultMannequinFemaleREF5.Pose to 2 elseIf GetIsReference JVaultMannequinMaleREF6 == 1 JVaultMannequinFemaleREF6.Enable removeallitems JVaultMannequinFemaleREF6 Set JVaultMannequinFemaleREF6.Pose to 2 endif elseif type == 1 Set WasPossed to 0 Disable If GetIsReference JVaultMannequinFemaleREF1 == 1 JVaultMannequinMaleREF1.Enable removeallitems JVaultMannequinMaleREF1 Set JVaultMannequinMaleREF1.Pose to 2 elseIf GetIsReference JVaultMannequinFemaleREF2 == 1 JVaultMannequinMaleREF2.Enable removeallitems JVaultMannequinMaleREF2 Set JVaultMannequinMaleREF2.Pose to 2 elseIf GetIsReference JVaultMannequinFemaleREF3 == 1 JVaultMannequinMaleREF3.Enable removeallitems JVaultMannequinMaleREF3 Set JVaultMannequinMaleREF3.Pose to 2 elseIf GetIsReference JVaultMannequinFemaleREF4 == 1 JVaultMannequinMaleREF4.Enable removeallitems JVaultMannequinMaleREF4 Set JVaultMannequinMaleREF4.Pose to 2 elseIf GetIsReference JVaultMannequinFemaleREF5 == 1 JVaultMannequinMaleREF5.Enable removeallitems JVaultMannequinMaleREF5 Set JVaultMannequinMaleREF5.Pose to 2 elseIf GetIsReference JVaultMannequinFemaleREF6 == 1 JVaultMannequinMaleREF6.Enable removeallitems JVaultMannequinMaleREF6 Set JVaultMannequinMaleREF6.Pose to 2 endif endif elseif button == 2 ;equip weapon Set pose to 1 AddItem JVaultMannequinAmmoList, 1, 1 elseif button == 3 ;unequip weapon Set pose to 2 endif if Timer > 0 set Timer to Timer - GetSecondsPassed elseif EndPose == 1 && GetAnimAction != 0 && GetAnimAction != 1 ; Pose, stage 2. Turn off AI to freeze it in place. RemoveScriptPackage JVaultMannequinWeaponReady RemoveScriptPackage JVaultMannequinWeaponHolster SetActorsAI 0 Set EndPose to 0 RemoveItem JVaultMannequinAmmoList, 1, 1 Set Activated to 0 SetActorAlpha 1 elseIf Pose == 1 SetActorAlpha 0 Set Activated to 1 SetActorsAI 1 set Timer to 4 set EndPose to 1 Set WasPossed to 1 Set Pose to 0 AddScriptPackage JVaultMannequinWeaponReady EvaluatePackage JVaultMannequinWeaponReady elseIf Pose == 2 SetActorAlpha 0 Set Activated to 1 SetActorsAI 1 set Timer to 2 set EndPose to 1 Set WasPossed to 0 Set Pose to 0 AddScriptPackage JVaultMannequinWeaponHolster EvaluatePackage JVaultMannequinWeaponHolster elseIf RePose == 1 && GetInSameCell Player == 1 Set MoveToPos to GetLinkedRef Moveto MoveToPos If WasPossed == 1 Set Pose to 1 Set RePose to 0 AddItem JVaultMannequinAmmoList, 1, 1 else Set Pose to 2 Set RePose to 0 endif endif endif END Link to comment Share on other sites More sharing options...
rickerhk Posted December 4, 2010 Share Posted December 4, 2010 Others are also having problems with RemoveallItems. Try commenting them out to see if the CTD goes away. http://forums.bethsoft.com/index.php?/topic/1138480-req-reviving-allies/page__p__16647945__hl__removeallitems__fromsearch__1&&do=findComment&comment=16647945 Link to comment Share on other sites More sharing options...
RellioN Posted December 4, 2010 Author Share Posted December 4, 2010 (edited) That fixed it. Thanks. How they continually manage to break working features is beyond me... I also notice that it almost isn't used by NV. Edited December 4, 2010 by RellioN Link to comment Share on other sites More sharing options...
rickerhk Posted December 5, 2010 Share Posted December 5, 2010 That fixed it. Thanks. How they continually manage to break working features is beyond me... I also notice that it almost isn't used by NV. You might try using Sexchange on the mannequins so you don't have to use the RemoveAllItems command. http://geck.bethsoft...x.php/SexChange Link to comment Share on other sites More sharing options...
Recommended Posts