Jump to content

Need help with Scripting


TheMan21

Recommended Posts

Hello to all people reading this

 

I will explain it fast: I want to do some things with papyrus, and everything I did before worked perfectly. Currently I'm trying out the shakecamera function, but I cant get it to work.

 

I tried to let the camera shake when the player falls down (dont know why).

 

This is my current Script:

Scriptname testcript2 extends ObjectReference  


Function SomeFunction()
       RegisterForAnimationEvent(Game.GetPlayer(), "JumpLandEnd")
EndFunction

Event OnAnimationEvent(ObjectReference Game.GetPlayer(), string  "JumpLandEnd")
	Game.ShakeCamera(afStrength = 0.3)
endEvent
	

 

Can anyone tell me what I did wrong?

Edited by TheMan21
Link to comment
Share on other sites

First, thanks for your answer, but it don't woks :(

 

I had to change "... string "JumpLandEnd")" to "string asEventName)" , because the compiler said "failed"

 

(d:\steam\steamapps\common\skyrim\Data\Scripts\Source\testscript2.psc(13,52): no viable alternative at input 'string'

No output generated for newscript, compilation failed.)

 

Scriptname testscript2 extends ObjectReference  


Function SomeFunction()
       RegisterForAnimationEvent(Game.GetPlayer(), "JumpLandDirectional")
RegisterForAnimationEvent(Game.GetPlayer(), "JumpLand")
RegisterForAnimationEvent(Game.GetPlayer(), "JumpSoftEnd")
RegisterForAnimationEvent(Game.GetPlayer(), "JumpSoftEndFailSafe")
RegisterForAnimationEvent(Game.GetPlayer(), "JumpLandEnd")
EndFunction

	
Event OnAnimationEvent(ObjectReference akReference, string asEventName)
	Game.ShakeCamera(afStrength = 0.9)
endEvent

 

And I'm not sure which of the Animations is the correct one. I hope one of this is correct.

Edited by TheMan21
Link to comment
Share on other sites

Scriptname testscript2 extends ObjectReference  


Event OnLoad()
Actor Player = Game.GetPlayer()
       RegisterForAnimationEvent(Player, "JumpLandDirectional")
       RegisterForAnimationEvent(Player, "JumpLand")
       RegisterForAnimationEvent(Player, "JumpSoftEnd")
       RegisterForAnimationEvent(Player, "JumpSoftEndFailSafe")
       RegisterForAnimationEvent(Player, "JumpLandEnd")
EndEvent

               
Event OnAnimationEvent(ObjectReference Source, string EventName)
               Game.ShakeCamera(Game.GetPlayer(), 0.9, 2.0)
EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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