Why doesn't my Script work (Enable & Disable)?

Post » Tue Jun 19, 2012 9:51 am

Ok, so when a quest gets to stage 10, it should Enable the reference (Xmarker), which is enable parented to 5 other objects (Dragon NPC, Chest, Branches, and random item). However, it won't kick off/do it.

Here is my script:

Alias_DragonEnabler.GetReference().Enable()

The alias is set on an Xmarker with Initially Disabled and Respawns checked.
User avatar
Darlene DIllow
 
Posts: 3403
Joined: Fri Oct 26, 2007 5:34 am

Post » Mon Jun 18, 2012 9:45 pm

in my own scripts I just use mymarker.enable() , And then set a property called mymarker that is linked to my xmarker via ObjectReference
User avatar
Trevor Bostwick
 
Posts: 3393
Joined: Tue Sep 25, 2007 10:51 am

Post » Tue Jun 19, 2012 4:41 am

That seems like a good idea. I will give that a shot. ty.

Quick Edit - It did not work. At least it didnt activate the Objective tracker...
User avatar
Setal Vara
 
Posts: 3390
Joined: Thu Nov 16, 2006 1:24 pm

Post » Tue Jun 19, 2012 12:55 pm

Bump? Any help?
User avatar
kelly thomson
 
Posts: 3380
Joined: Thu Jun 22, 2006 12:18 pm

Post » Tue Jun 19, 2012 1:56 am

As you describe it, it SHOULD work. So you might want to double check that your xmarker is properly connected as the alias and/or object reference. When you're in the edit quest window, and you pull up the details for your alias, do you have a Specific Reference, and does it tell you that you have forced the reference under "fill type" (and is it the right reference)? You might want to reconnect it, just in case :P

There are so many little moving parts when designing a quest, and sometimes it feels like looking for a needle in a haystack when something doesn't work. I feel your pain.
User avatar
Leilene Nessel
 
Posts: 3428
Joined: Sun Apr 15, 2007 2:11 am

Post » Tue Jun 19, 2012 7:45 am

I'm having the exact same trouble. In my quest, at stage 30, I have about 5 alias-set buildings become enabled (each a single alias, not linked together in any way). This works just fine, and as intended. However, at stage 5, there is supposed to be a camp pop up - a bedroll, a sitting furniture spot, and an NPC currently for testing. None of them will show up despite my best efforts.

They are are all linked to the XMarker.

XMarker ID: Camp_Enabler Initially Disabled / Respawns

Bedroll & NPC : Respawns Enable Parent: Camp_Enabler


First I tried simply setting up the XMarker as an alias (CampEnabler), then in stage 5 ran
Alias_CampEnabler.GetReference().Enable()

No compiling errors, but in game nothing happens at all.


------------

After seeing this post, I tried it as a property. In the Quest, I went to scripts, picked the one already made, and added the XMarker as an object reference, setting it to the XMarker properly.

In stage 5, I tried CampMarker.Enable(). Again, compiled fine, but nothing happened. I also tried kmyQuest.CampMarker.Enable(), using the script itself as the kmyQuest. Compiled, nothing happens in game.



Is anyone else have any ideas? Did we miss a step somewhere? I know it is very similar, but it seemed so much easier to do with the Fallout editor =P Thanks for any help!
User avatar
josie treuberg
 
Posts: 3572
Joined: Wed Feb 07, 2007 7:56 am

Post » Tue Jun 19, 2012 8:37 am

I believe it might be an issue assigning References to the Xmarker, but I could be wrong. Still looking for help...
User avatar
City Swagga
 
Posts: 3498
Joined: Sat May 12, 2007 1:04 am

Post » Tue Jun 19, 2012 5:10 am

Check the papryus logs to see if the command had an error when it tried to enable the reference. Also adding debug.trace("text") to your scripts will make lines occur in the log as well.

Provided you enabled the logging for papryus in the ini file.
User avatar
Tha King o Geekz
 
Posts: 3556
Joined: Mon May 07, 2007 9:14 pm

Post » Tue Jun 19, 2012 11:28 am

I tried using the debug/logging and at first nothing at all was showing up as an error. So, I added a Trace to the stage 5 (where my xmarker is enabled), and it wouldn't even show up, despite using SetStage questname 5.

I tried adding some traces to stage 30, which is where the buildings worked (no enable parent), and the traces popped up just fine in the log. So, I figured I would just copy/paste my part from stage 5 into 30 to see what happened. I get the following error:

Trying Alias CampEnabler GetRef Enable
[02/26/2012 - 01:41:46PM] error: Cannot call Enable() on a None object, aborting function call
stack

The "Trying Alias..." part is what I put as the trace. I checked the alias, and it was set to forced specific reference of Camp_XMarker_Enabler, which is the correct marker.

So now I am left with a couple questions:
1) What does that error mean? I tried checking the 'allow disabled' checkmark on it , but I still get the error. I'm sure I could set individual aliases for everything I do, but I figured this would save time, especially down the road when numerous things will be added/removed at once.

2) Why does my trace not even work for stage 5? It is the exact same papyrus fragment (from the stage) just moved into stage 30. I would at first suspect I missed having a dialogue call it or something, but for debugging I am simply using console commands to SetStage 5. Shouldn't it be firing regardless?


This is such simple stuff that it is driving me bonkers. I'm tempted to just flee back to the GECK =P Anyhow, thanks for any help!

Also Dalagrath, I tried using a cw1meleecloseattacker, which they seem to use in Helgen for the same purpose or similar, and got the same results.
User avatar
Natalie Taylor
 
Posts: 3301
Joined: Mon Sep 11, 2006 7:54 pm


Return to V - Skyrim