Jump to content
⚠ Known Issue: Media on User Profiles ×

KJA1258

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by KJA1258

  1. What does IMHO mean? I've seen that acronym quiet often, but as an ESL student I don't know what it means.
  2. Was about to ask which is faster, property or storing Game.GetPlayer() in a variable (or pointer? since Papyrus is object oriented). Thanks again for everybody that answered, helps a lot while still learning Papyrus. Wiki's a stub.
  3. Thanks a lot for the input. It was actually triggering correctly, I just renamed the file and script before and that kinda messed Skyrim up. I will clean it up, however, my example here is by now legacy code. Thanks for the logical operators, I couldn't find them anywhere. Interestingly, they are the same as Objective-C, my native language. As a side question, is it better to call Actor PlayerRef = Game.GetPlayer() instead of Game.GetPlayer() directly where I need it?
  4. Hello everyone. The topic title suggest a very unusual problem (if you can call it that way) I've stumbled upon while writing a Papyrus script. Although I'm new to Papyrus, I'm no complete beginner to programming. Concerning the error/problem, it appears as if Papyrus simply ignores the if condition. Here is the code: Scriptname AutoCombatCamPlayerScript extends Quest {Forces Player into FP Cam on Combat Initiation and when Bow or XBow is drawn} GlobalVariable Property myKey Auto int camState int hotkey = 76 int enabled Event OnInit() Debug.Notification("Started AutoCombatCam") RegisterForSingleUpdate(1) EndEvent Event OnKeyDown(Int KeyCode) If Input.IsKeyPressed(hotkey) ; Only run code when the status changes Debug.Notification("Hotkey Pressed") If enabled == 1 Debug.Notification("Turned On") RegisterForUpdate(1) Debug.Notification("Started") enabled = 0 Else ; If enabled == False Debug.Notification("Turned Off") UnregisterForUpdate() Debug.Notification("Killed") enabled = 1 EndIf EndIf EndEvent Event OnUpdate() Debug.Notification("EXEC") RegisterForKey(hotkey) hotkey = myKey.getValueInt() If enabled == 0 If (Game.GetPlayer()).IsInCombat() Game.ForceFirstPerson() Else ;Not in combat, switch to FP on Bow and XBow draw If (Game.GetPlayer()).IsWeaponDrawn() If (Game.GetPlayer()).GetEquippedItemType(0) == 7 Game.ForceFirstPerson() ElseIf (Game.GetPlayer()).GetEquippedItemType(0) == 12 Game.ForceFirstPerson() EndIf EndIf EndIf EndIf RegisterForSingleUpdate(1) EndEvent I would be pleased if anyone could figure this out, since I'm, though knowing Obj-C, too inexperienced to know why this is caused or to resolve it. EDIT: I should have mentioned which IF statement it actually is. The affected statement is the if enabled == 0 in the onUpdate() event. Kilian
×
×
  • Create New...