Jump to content

Cipscis

Premium Member
  • Posts

    1103
  • Joined

  • Last visited

Everything posted by Cipscis

  1. Di0nysis, I haven't used it myself but the SetInChargen function's first parameter seems intended to prevent saving. Cipscis
  2. Just checking the obvious thing first, is the GlobalVariable property properly hooked up in the Creation Kit? Cipscis
  3. I don't think you can do that, no, but there are other methods you could use. For example, you could store the value via tokens (unplayable, therefore invisible, pieces of armour) in their inventory. Cipscis
  4. I don't know much about fragments so I don't know if that's usual behaviour, but Papyrus is case-insensitive so it should at least be harmless. Cipscis
  5. The wiki has some documentation on this you might find useful - Save File Notes (Papyrus) Cipscis
  6. In case it helps, I've run into the same problem and posted about it in this thread I found in the "Feedback, suggestions and questions" forum - Can't seem to tag my file! Cipscis
  7. Sublime Text 2 itself is in English, but I don't think there's anything in particular that makes this specific to any non-programming language. As far as I'm away, the Papyrus Assembly language will be the same for users of all languages, so they'll all be able to use it. The only bit that's specifically in English is the documentation. I'm not sure what the best practice is for tagging when a file is (mostly) independent of language, but I'd guess it's probably to have no language tags instead of all of them. If that's right, then untagging it as English would probably be for the best, thanks :) Cipscis
  8. Thanks, I noticed that :) (see edit) I've managed to tag the file myself now, but not via the usual method. Instead, I used Visual Event to view the JavaScript events attached to the tagging buttons and manually tagged them by calling the event in the browser's console and manipulating the "ID" argument (which was 0 on the page, instead of 24009 as it should have been). If it helps, I'm using Chrome 21.0.1180.89, and I also tried this via my iPhone and had the same problem. Cipscis EDIT: Actually, the orange tag I noticed was "Language - English". I wonder if that might have been someone else then, if not you? Cipscis
  9. Just reporting that this has also happened with my latest file - Papyrus Assembly package for Sublime Text 2 I'll edit this post once I've been able to successfully tag it. Cipscis
  10. You should be able to call it on the result of GetParentCell, although I'll admit I'm not sure how useful the name of a cell will always be. Are cells out in the wilderness called "Wilderness"? Cipscis
  11. When a save is loaded, the OnPlayerLoadGame event is called on the player. You can receive this event by creating a quest that has an alias pointing to the player, and attaching a script (extending ReferenceAlias) to the alias. In that script, you can detect when the player loads a save via the OnPlayerLoadGame event. Cipscis
  12. There seems to be a bit of misunderstanding in this thread, so hopefully I can clear it up in this post. The special variable "Self" refers to the object to which the script is attached, not the script itself. The confusion here arouses, I suspect, due to the fact that "Self" refers to the object cast to the type defined by the script. Every Papyrus script is essentially a type definition. For example, Actor.psc defines the type "Actor". If I write a script called "MyActorScript" that extends "Actor", then I'm essentially defining a type called "MyActorScript", and every Actor to which MyActorScript attached will be an object of type MyActorScript. GetBaseObject returns the base object (of type Form) of the object on which it is called. If it's called without explicitly specifying the object on which it should be called, then it is called on "Self". In this case, that means the scripted object as the type you're defining in your script. As your script extends ObjectReference, it also inherits all of ObjectReference's functions, including GetBaseObject. The difficulty you're facing is likely due to issues with inventory items. I can't remember when it will and won't work, but I think creating the item outside of an inventory then adding it to an inventory will cause it to act appropriately, whereas creating an item inside an inventory may cause issues. This isn't something I've had to deal with very much, though, so I can't tell you off the top of my head how to solve your problem. Hopefully I've at least clarified what's going on here a bit for you though. Cipscis
  13. It's generally a good rule of thumb that if something has been implemented by SKSE it isn't possible in vanilla. The wiki has some good information you might find useful. Take a look at this page in particular: Save File Notes (Papyrus) Cipscis
  14. I'm surprised that apparently worked, since GetStage is not redefined in the "Done" state so will work in exactly the same way if called after the script is sent to that State. If swapping those 2 lines worked, then the original script should also work. Cipscis
  15. OnEquipped is only called on ObjectReferences, which includes inventory items like equipment but not other equippable Forms like Shouts and Spells. While it's entirely possible to define such an event in a script extending Shout or Spell, the game engine will never call it on those forms so it won't act as the entry point you're looking for there, unfortunately. Cipscis
  16. Could be right - I don't have access to the CK at the moment so I've been posting from memory. Cipscis
  17. The global variable "GameHour" controls/is controlled by the current time. If you set it to 19, the game will jump to 7pm: GlobalVariable Property GameHour Auto ; ... GameHour.SetValue(19.0) Cipscis
  18. Hi antstubell, There's an event called OnOpen that might work for you here, as OnActivate would fire whenever the door is activated whether or not it is actually opened (like if it's locked, for example). Something like this would probably do the trick: ScriptName SetStageOnOpen extends ObjectReference Quest Property MyQuest Auto {In the CK, set this to the Quest whose stage you want to set} Int Property StageIndex Auto {In the CK, set this to the stage index you want to use in SetStage} Event OnOpen(ObjectReference akActionRef) GoToState("Done") MyQuest.SetStage(StageIndex) EndEvent State Done Event OnOpen(ObjectReference akActionRef) ; Do nothing EndEvent EndState Cipscis
  19. If a mod tries to use one of SKSE's Papyrus functions without SKSE loaded it won't crash the game. Instead, the function will just do nothing and return a relevant falsy value (0, 0.0, "", False, or None). Cipscis
  20. Hmm, possibly. If you're getting the first notification then I guess I don't need to ask if you've autofilled your PlayerRef property. I remember there an IsInCombat function for previous games that still exists as the console function IsInCombat. You could test in the console to see if it works and, if it does, use this approach to check it via Papyrus if it works. I'd hope there'd be a way of checking this directly via Papyrus, though. Kind of disappointed to see that neither of these functions seem to work. I guess I shouldn't be entirely surprised, though, given that the OnCombatStateChanged event will never be called on the player. Cipscis EDIT: Would you mind adding notes to the wiki's documentation for IsInCombat and GetCombatState detailing your findings? You just need to say that they don't work as expected for the player, and mention how they seem to work (like always returning a particular value, if that's what happens). Cipscis
  21. IsInCombat's return value is of type Bool, why are you comparing it to an Int? In fact, why are you comparing it at all? If it returns True then that will be enough to trigger that conditional block. How does this script work for you? Actor property PlayerRef auto Sound property WitcherAmuletDetectCombatSound01 auto ImageSpaceModifier property WitcherAmuletEnterCombatIMOD auto Event OnUpdate() If (PlayerRef.IsInCombat()) Debug.MessageBox("Your medallion vibrates...") WitcherAmuletEnterCombatIMOD.apply() WitcherAmuletDetectCombatSound01.play(PlayerRef) Else RegisterForSingleUpdate(0.5) EndIf EndEvent Event OnEquipped(Actor akActor) If (akActor == PlayerRef) Debug.Notification("Player equipped medallion") RegisterForSingleUpdate(0.5) EndIf EndEvent
  22. Oh, did you try to compile the decompiled source? Yeah, that won't work. The result of the decompilation is an intermediate between a compiled script and source code. The latest Creation Kit update should have added the proper Dawnguard Papyrus source files under Scripts/Source/Dawnguard (I think that's the right directory). Try moving those files into your regular source folder and see if that compiles. Cipscis
  23. I've seen reports that some of the script source doesn't match what's used in Dawnguard. What are the errors? Cipscis
×
×
  • Create New...