TES4programmer Posted March 18, 2012 Share Posted March 18, 2012 Guys, I'm working on a scripted part of a quest I made. The player triggers an area and he falls down.and after that many Image Space Modifiers. It's like a test for the main script, but if the test works, the other script will also work. The code: import game import utility ImageSpaceModifier property FadeToBlackImod Auto ImageSpaceModifier property pStrikeandFall auto ImageSpaceModifier property FadeToBlackHoldImod Auto Idle property pKnockDown Auto Actor property Player Auto bool bPlayerInTrigger Event OnTriggerEnter(ObjectReference triggerRef) If(game.getPlayer()==AkActivator) bPlayerInTrigger = true Game.GetPlayer().ResetHealthAndLimbs() Game.GetPlayer().StopCombatAlarm() Game.ForceFirstPerson() Game.DisablePlayerControls(abCamSwitch = True, abMenu = false, abMovement= True, abLooking = true, abJournalTabs = false, abActivate = True, abSneaking = True, abFighting = true) Game.GetPlayer().StopCombatAlarmOnActor() ; to prevent AGAIN from fighting ;bool Function PlayIdle(Idle akIdle) pStrikeandFall.Apply() player.PlayIdle(pKnockdown) if Player.PlayIdle(pKnockdown) Debug.Notification("Idle played.") else debug.Notification("Idle was not played correctly.") endIf utility.Wait(5) Debug.MessageBox("You Are Knocked Down.") utility.wait(3) FadeToBlackImod.Apply() utility.wait(2) FadetoBlackImod.PopTo(FadeToBlackHoldImod) endevent ;After that the player is moved to another area, where he wakes up, and all the events of the quest... No Matter How many times I enter the Trigger, the Controls are disabled, but the Idle always falls in the "else" line, that it was not played correctly.Also, the Command "Fade to Black Imod" doesn't apply, even declaring him on the top of the code.If anyone have any ideas, please help me, I'm almost releasing a super mod that everyone will use. I just can't give spoilers here... Link to comment Share on other sites More sharing options...
tunaisafish Posted March 18, 2012 Share Posted March 18, 2012 Have you actually assigned player? Do that at the beginning and get rid of all the other game.getplayer()'s comment out the first plyidle too, and just use the one with the 'if' condition. Link to comment Share on other sites More sharing options...
TES4programmer Posted March 28, 2012 Author Share Posted March 28, 2012 Thanks for your help man, but the error was another one: I forgot to assign the property to pick an object.I have already continued the mod, sorry if I took too long to respond. Link to comment Share on other sites More sharing options...
Recommended Posts