Jump to content

HerrBaron

Premium Member
  • Posts

    135
  • Joined

  • Last visited

Everything posted by HerrBaron

  1. I've looked at Game.FindClosestActorFromRef, but this could return the player, or even his horse if it's the closest actor to him. What I'm trying to do is to script the player's current follower into a trigger behind them, which is in a small, enclosed space. The trigger will then move the actionref, be they player or follower, to another location. We have a Game.GetPlayersLastRiddenHorse(); why not the current follower?? Any ideas, here, folks? Thank you in advance! -HB
  2. it works; dude, you're a god, and I am not worthy! :D All true to the above, too; primitive is the appropriate word. Instantiation of a ADVObjectWithChildren would have been simple, if we could simply do a "m_rTentShell = new ADVObjectWithChildren( rTent)", but nooooooooo! Thank you jimhsu! Much appreciated! -HB
  3. http://forums.nexusmods.com/public/style_emoticons/dark/biggrin.gif No, you don't suck; thank you for helping out! I'll give it a shot and let you know.
  4. Many thanks for the reply! :) Yes; it compiles, and runs, adds the spell, then I get the aforementioned error messages. No, I haven't attached the second script to the reference; is this necessary? I thought we were able to use the object-oriented principle of polymorphism with Papyrus...? In other words, I should be able to assign a pointer of type parent to a pointer to type child, right? E.G. with Animal->Horse, Horse is an animal; I should be able to assign a Horse to Animal, and have access to the methods of Animal. Best! -HB
  5. I have a quest with the following script attached: Scriptname ADVTentQuestScript extends Quest Import ADVObjectWithChildren SPELL Property SummonTentSpellRef Auto Message Property SpellAddedMessage Auto String Property ADVLogName Auto ObjectReference Property rTent Auto Keyword[] Property kwChildren Auto ADVObjectWithChildren m_rTentShell ADVObjectWithChildren Property TentShell ADVObjectWithChildren Function Get() return m_rTentShell EndFunction EndProperty Event OnInit() Debug.OpenUserLog( ADVLogName ) Debug.TraceUser ( ADVLogName, "Entering ADVTentQuestScript.OnInit" ) Debug.Notification ( "Entering ADVTentQuestScript.OnInit" ) if ( !game.GetPlayer().HasSpell( SummonTentSpellRef ) ) Debug.TraceUser (ADVLogName, "Adding Spell.") game.GetPlayer().AddSpell( SummonTentSpellRef ) SpellAddedMessage.Show() m_rTentShell = rTent As ADVObjectWithChildren m_rTentShell.Initialize( kwChildren ) endif Debug.TraceUser ( ADVLogName, "Leaving ADVTentQuestScript.OnInit" ) Debug.Notification ( "Leaving ADVTentQuestScript.OnInit" ) EndEvent On line 8, m_rTentShell is a script which extends ObjectReference; it looks like this (not complete): ScriptName ADVObjectWithChildren Extends ObjectReference Import AdvLinkedChildObject Quest m_Quest = None Bool Function MoveChildren() return( False ) EndFunction Bool Function Initialize( Keyword[] kwChildren ) Debug.Notification ("Entering ADVObjectWithChildren.Initialize") int iChildren = kwChildren.Length Debug.Notification ("We have " + iChildren + "children.") ; Debug.TraceUser( ADVTentQuest.ADVLogName, "ADVObjectWithChildren.Initialize; we have " \ ; + iChildren + "children.") Debug.Notification ("Leaving ADVObjectWithChildren.Initialize") return( True ) EndFunction Note that these lines in the quest script above: m_rTentShell = rTent As ADVObjectWithChildren m_rTentShell.Initialize( kwChildren ) are telling me respectively at runtime that Papyrus can't assign to a None object, and that it can't call initialize on it. So my question is this: why is the cast "rTent as ADVObjectWithChildren" not working? Any assistance you guys can give me on this will be greatly appreciated! -HB
  6. Sorry I wasn't clearer; I meant move the references to the player in Papyrus script... thanks for the reply! -HB
  7. Is there a way to move multiple related references simultaneously? I have a permanent ref with several other permanent refs linked to it by keyword (on the linked refs tab). The positions of these linked references relative to the ref they're linked to are significant. Is there a way to move them all at once, in proper relative position? I suspect there isn't, but thought I'd ask anyway. Thanks! -HB
  8. Excuse me, but would you care to state clearly what you mean by this, before I get my back up about it?
  9. External editor and compiler support would be most cool! :)
  10. HAH! I have this love/hate thing with Bethsoft; I love their games (most of the time), but there's something seriously lacking in a dev team that has to literally be bludgeoned into setting the compiler optimization switches for a specific platform. It just doesn't speak well for the kind of initiative you expect to be displayed by team members. As to debugging and QA, here again they had to get the tar whipped out of them with the first round of "fixes" they released, breaking huge numbers of games for huge numbers of players. I'd say they learned the hard way. On the bright side, I'm pretty impressed with this current patch! :)
  11. Just one word I haven't seen mentioned in all the discussion about the new scripting engine: debugging...? :)
  12. Bloody goat's head! Anyone figured out how to draw the runes with Helselt around the pyre? If I go from the burnt tree to the goat's skull, then try to go to the petrified bread, I end up starting over; if I go toward the black candles, I start over... what's up with this? - HB
  13. Here's another one, same procedure as above, but crashed with nothing hotkeyed and died on the first hotkey checked. The crash dump from Windows is also shown, clearly indicating a crash in nvse_1_1.dll.
  14. Ok, here's what I did: Modified the code to loop the hotkeys in reverse from 8 to 1, skipping 2reverted to calling GetHotkeyItem without the Player ref.Started a fresh game with nearly all mods disabled.Entered the tent with 2 vanilla weapons taken from Doc Mitchell's house, an AEP7 laser pistol and a 9mm pistol, nothing hotkeyed.did a scof "wstn.txt"did an SV on the container; vars looked normal, all zero'd.activated the container and selected to move weapons to storage.loop went through, moving all weapons.took the 2 weapons back out of the container.set the 9mm pistol on hotkey 1reactivated the container to move the non-hotkeyed weapons to storage.Hotkey loop hit item 8 (the first one).Game crashed to desktop.I've attached the dump; right now, I'd have to say GetHotkeyItem is porked, bigtime.
  15. I did a GREP for the variables I was seeing in SV through *.ESM and *.ESP; turns out they are coming from BOE Vegas Edition, specifically from Mo'.esm; however, since I was having this issue before installing this mod, it's unlikely to be the cuprit. That said, this is another I'll disable with a fresh char/game.
  16. Yup; that would be the Inventory sorter mod; I've disabled it, but it left artifacts even in a fresh save, so I'll need to start a new char/game to test further; won't be able to do this til tonight. Interesting; I think we're on the right track here! Can't thank you enough for the SV and SCOF tips; these have finally given me some visibility into what's actually going on with the inards of the script I write; greatly appreciated!
  17. Haven't tried this specifically, but I will and post back with results; thanks! Good suggestion!
  18. Really, really strange; these are stock weapons, for the most part, without mods, at least the ones I've been testing with... For what it's worth, when I do an SV on the container before and after crash, there are a bunch of DoOnce and other variables that are NOT part of the script I built, but more of them after a crash than before. I'm puzzled about that. Oh, and no, haven't tried doing the hot key loop in reverse; easy enough to try. Ya know, the only mod I'm running that could conceivably be screwing things up is and Inventory Sorter; I'm gonna disable it and see what I get...
  19. Yeah, I tried that; without the reference to Player, it always comes back with 0, hence nothing gets added to the exception list, and all weapons are removed. So the documentation is in error.
  20. Ok, here's the Code: ScriptName WSTNWeaponsMoverScript ref rHKBaseObject; ref rList; ref rContainer; int Button; int nItems; int HotKeyIndex; int iListIndex; int ItemType; int HKItemCount; short bActivated; Begin OnActivate Player set Button to -1; ShowMessage WSTNMsgWeapons; set bActivated to 1; End Begin GameMode if ( bActivated ) printc "bActivated" set Button to GetButtonPressed; if ( Button == 0 ) ; first option in menu is "Open it." Activate Player, 0; elseif ( Button == 1 ) printc "Button == 1"; set rList to WSTNHKItemList; set HotKeyIndex to 1; set HKItemCount to 0; set ItemType to 0; set iListIndex to 0; set rHKBaseObject to 0; label 10 if ( HotKeyIndex <= 8 ) printc "calling GetHotKeyItem %0.f", HotKeyIndex; set rHKBaseObject to Player.GetHotKeyItem HotKeyIndex; printc "back from GetHotKeyItem %0.f, rHKBaseObject = %n", HotKeyIndex, rHKBaseObject; if ( rHKBaseObject ) printc "Calling GetObjectType with %n", rHKBaseObject; set ItemType to GetObjectType rHKBaseObject; printc "ItemType = %0.f", ItemType; if ( ItemType == 40 ) printc "Adding %n", rHKBaseObject; ListAddForm rList, rHKBaseObject; set HKItemCount to HKItemCount + 1; endif ; ( ItemType == 40 ) set rHKBaseObject to 0; endif ; ( rHKBaseObject ) set HotKeyIndex to HotKeyIndex + 1; if ( HotKeyIndex == 2 ) set HotKeyIndex to 3; endif goto 10; endif ; ( HotKeyIndex <= 8 ) set rContainer to GetSelf; printc "rContainer = %n, calling RemoveAllTypedItems", rContainer; Player.RemoveAllTypedItems rContainer, 0, 0, 40, rList; printc "Back from RemoveAllTypedItems"; set rList to WSTNHKItemList; set iListIndex to ListGetCount rList - 1; Label 20 printc "iListIndex = %0.f", iListIndex; if ( iListIndex >= 0 ) set rHKBaseObject to ListRemoveNthForm rList, iListIndex ; printc "removed %n", rHKBaseObject; set iListIndex to iListIndex - 1; goto 20; endif ; ( iListIndex >= 0 ) printc "Activating..." Activate Player, 0; endif ; ( Button == 1 ) set bActivated to 0; endif ; ( bActivated ) End And here's a dump that shows two Activations; the first one shows the container was opened (to remove a bunch of weapons), and a transfer back without repairing the weapons taken into inventory. Bear in mind, NONE of these weapons taken from the cabinet were placed on hotkeys. SetConsoleOutputFilename >> 'wstn.txt' bActivated bActivated Button == 1 calling GetHotKeyItem 1 back from GetHotKeyItem 1, rHKBaseObject = Hk USP Calling GetObjectType with Hk USP ItemType = 40 Adding Hk USP calling GetHotKeyItem 3 back from GetHotKeyItem 3, rHKBaseObject = HK G36C Calling GetObjectType with HK G36C ItemType = 40 Adding HK G36C calling GetHotKeyItem 4 back from GetHotKeyItem 4, rHKBaseObject = DSR-1 Sniper Calling GetObjectType with DSR-1 Sniper ItemType = 40 Adding DSR-1 Sniper calling GetHotKeyItem 5 back from GetHotKeyItem 5, rHKBaseObject = Mossberg 590 Calling GetObjectType with Mossberg 590 ItemType = 40 Adding Mossberg 590 calling GetHotKeyItem 6 back from GetHotKeyItem 6, rHKBaseObject = <no name> calling GetHotKeyItem 7 back from GetHotKeyItem 7, rHKBaseObject = <no name> calling GetHotKeyItem 8 back from GetHotKeyItem 8, rHKBaseObject = <no name> rContainer = Weapon Locker, calling RemoveAllTypedItems Back from RemoveAllTypedItems iListIndex = 4 removed Mossberg 590 iListIndex = 3 removed DSR-1 Sniper iListIndex = 2 removed HK G36C iListIndex = 1 removed Hk USP iListIndex = 0 removed Nothing iListIndex = -1 Activating... Now here's two more activations, the first to remove a bunch of weapons (followed by repairing them in inventory), and the second activation to have the container sort them back into itself: bActivated bActivated Button == 1 calling GetHotKeyItem 1 BOOM, BOOM and out go the lights! This is repeatable time after time after time. Looks like the editor cut off some line ends, so I've attached the code and the dump.
  21. Boy, Ricker; those two debugging aids really helped me get down the road! So here's what appears to be going on, a new wrinkle: If I go to the cabinet upon entry to the cell and activate it such that it transfers unhotkeyed items to the cabinet, everything works just fine. If, however, I open the cabinet, remove several items and do repairs on them using the R key from the weapons tab in the PipBoy, then activate the cabinet to transfer these repaired weapons back to the cabinet...BOOM! Down she goes. According to the dump from scof, it's dying on the call to Player.GetHotKeyItem 1, never comes back. If I remove a bunch of weapons from the cabinet, and return them to the cabinet without doing anything to them, it works fine. So I guess the question comes down to this: What happens to a repaired item (weapon) that causes GetHotKeyItem 1 to fail, even though the repaired item is NOT hotkeyed?? Let me get a couple of fresh dumps, and I'll post the code and the dumps in a bit.
  22. Hi IF! The formlist is loaded and cleared in the same GameMode block, on a GetKeyPressed of 1; so it all takes place in the same cell.
×
×
  • Create New...