Jump to content

Problems with Player Idle


TES4programmer

Recommended Posts

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

  • 2 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...