Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

OnActivate Problems


edhelsereg
 Share

Recommended Posts

I am trying to script an event where a message pops up when an activator is selected and the player is teleported to a new location; with the condition that a certain quest stage is active. This is what I wrote up but nothing is happening when I click the activator. When I take out the If statements the message box pops up.

Event onactivate(ObjectReference akActionRef)

if myQST.getStage() == 70

Debug.MessageBox("Ready yourself, mortal.")

Game.GetPlayer().MoveTo(ArenaStartMarker)

endif

endEvent

Link to comment
Share on other sites

Scriptname DA02ScornPillarScript extends ReferenceAlias

{Pillar active script}

Quest Property myQST Auto

MiscObject Property DA02Gem Auto

ObjectReference Property ArenaStartMarker Auto

Book Property Journal Auto

Int Property preReqStage Auto

{Quest Stage Requirement}

Event onactivate(ObjectReference akActionRef)

;Perhaps getStage() is none for some obscure reason...

debug.Notification("QStage=" + myQST.getStage())

debug.Trace("Ref=" + akActionRef + "QStage=" + myQST.getStage())

if (myQST.getStage() == 70)

Debug.MessageBox("Ready yourself, mortal.")

Game.GetPlayer().MoveTo(ArenaStartMarker)

endif

endEvent

Link to comment
Share on other sites

Have you attached the quest to the property correctly?

Also, why are you using 'ReferenceAlias'? Physical activators in the game usually use 'ObjectReference' instead.

GetStage may not work in a ReferenceAlias. :shrug:

There is a GetCurrentStageID function you could try instead, although it should be the same.

Scriptname DA02ScornPillarScript extends ObjectReference

{Pillar active script}

Quest Property myQST Auto

MiscObject Property DA02Gem Auto

ObjectReference Property ArenaStartMarker Auto

Book Property Journal Auto

Int Property preReqStage Auto

{Quest Stage Requirement}

Event onactivate(ObjectReference akActionRef)

if (myQST.getCurrentStageID() == 70)

Debug.MessageBox("Ready yourself, mortal.")

Game.GetPlayer().MoveTo(ArenaStartMarker)

endif

endEvent

still no message box

Link to comment
Share on other sites

You need to load a save game that NEVER had your mod installed when you saved the game.

Lots of things are saved with your save game and using a dirty save will give you all kinds of issues. Dirty being your mod was activated when you saved the game.

Hmm. I loaded a previous game with no past use of my mod, and now my mod doesn't seem to be enabled at all. I have it set to start game enabled. To be more specific, items that were added through the quest aliases are not appearing.

Edited by edhelsereg
Link to comment
Share on other sites

First, ensure its a clean save game.

Second, one reason for using a clean save game is that things can become 'broken' during your creation process. A clean save game will show this right away.

Also, make sure you have the mod activated. Its also possible the save game your using is corrupt and actually did have early parts of your mod activated with it. Its best to deactivate your mod, start a new game and then get to a location near where your mod starts (or just outside the training dungeon near helgen) and save your game. Then exit the game and activate your mod. Use this save game for all your testing and never save over the top of it.

You can use Levelers Tower to quickly level up test characters if you need it.

Link to comment
Share on other sites

First, ensure its a clean save game.

Second, one reason for using a clean save game is that things can become 'broken' during your creation process. A clean save game will show this right away.

Also, make sure you have the mod activated. Its also possible the save game your using is corrupt and actually did have early parts of your mod activated with it. Its best to deactivate your mod, start a new game and then get to a location near where your mod starts (or just outside the training dungeon near helgen) and save your game. Then exit the game and activate your mod. Use this save game for all your testing and never save over the top of it.

You can use Levelers Tower to quickly level up test characters if you need it.

Thanks, I started a whole new game and then uploaded the mod, but the items I added are just not showing up at all. Is there some sort of scripting to start the quest automatically, besides checking the start game enabled option.

EDIT: Tested on clean character. Looks like quest activates after all, not sure why not at start, but its acceptable. Stage 70 still has no message box on activator.

Edited by edhelsereg
Link to comment
Share on other sites

Could be. But I do not know much about quests and how they work. How they run the scripts.

Also, you cannot mod a mod, if that is what your doing. You cannot link to objects in another ESP the way you are doing it.

You can link to objects in another ESP, but it requires special code to do that.

Edited by WillieSea
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...