Jump to content

Recommended Posts

Posted

Nicedude is talking about the "Tags for this Mod", at the top of every mod page, in the 'objects' section.

 

Sorry I don't actually have an answer! :-/

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

Posted

Tags for filtering? If the mod provides new clutter objects or modifications of clutter objects then it could be given that tag. I do not think it would apply to a mod that uses clutter objects.

 

Example,

Mod A changes the mesh and or texture of a basket

Mod B adds new piles of gold to be scattered about

Mod C places existing objects in a new dungeon

 

Mods A and B could use the "Items - Clutter" tag

Mod C should not as the clutter is not the focus of the mod but rather the dungeon itself.

  • 4 weeks later...
Posted
Hello, i have a quetion

Does the STATE status of Papyrus reset on respawn?

I want to create an activator that will never work again with that saved data once it gets to the "DO NOTHING" STATE.

Posted

I don't believe states respawn. Once a script is in a state, it should stay in that stay until the GoToState function is used again. You might want to test it to be sure, and possibly make the activator a permanent reference so it doesn't respawn.

Posted

Thank you for the answer!

 

I want to prevent the script from running so that it does not affect performance, so the state method may not be appropriate.

I am planning two other methods: attach the script to the trigger box and do disable and none to the trigger box at the end of Event, and attach the script to the dialog of the quest.

Posted

Gotcha. You could also make an invisible activator and make the visible one a static. Then after the script runs, disable and delete the invisible activator.

Posted (edited)
Thanks!
For ease of explanation, I said activator, but it is actually a Static object. This script enables the Static object once the quest is completed.
I was thinking of attaching a script to the xmarker to enable the Static object at the same time using "enable parent".
But thanks to your post, I realized that there is a way to delete the xmarker with the script attached after enables the Static object using "LinkedRef".
Quest Property anyQuest  Auto  

int Property anyStage  Auto  

Message Property EnableAchiveMessage  Auto  

bool Property bStageMustBeDone = false Auto  
{false by default
if true, look for GetStageDone anyStage
if false, look for GetStage >= anyStage}

ObjectReference myLinkedRef

auto State waiting
	event OnLoad()
		myLinkedRef = GetLinkedRef() as ObjectReference
		if (bStageMustBeDone && anyQuest.GetStageDone(anyStage)) || (!bStageMustBeDone && anyQuest.GetStage() >= anyStage)
			gotoState("done")
			myLinkedRef.enable()
                        self.Delete()
                        self = None                   
			EnableAchiveMessage.Show()
		endif
	endEvent
endState

state done
; do nothing
; note: if ref is reenabled after this state is set, this script will not redisable it
endState

 

ah, self = None part could be wrong. I'm not sure if this part runs correctly as I'm writing this part myself.

Edited by nakednohman
Posted

Yes, self = None isn't necessary and won't even compile. The only reason to do that is to clear something from script memory. You could do myLinkedRef = none to clear it from memory, but you could also just put that property in the onLoad event. The only reason to hold that in script memory by defining it outside of the event is if you need to use it in other events. Like this:

 

Quest Property anyQuest  Auto  

int Property anyStage  Auto  

Message Property EnableAchiveMessage  Auto  

bool Property bStageMustBeDone = false Auto  
{false by default
if true, look for GetStageDone anyStage
if false, look for GetStage >= anyStage}

auto State waiting
    event OnLoad()
       ObjectReference myLinkedRef = GetLinkedRef() as ObjectReference
       if (bStageMustBeDone && anyQuest.GetStageDone(anyStage)) || (!bStageMustBeDone && anyQuest.GetStage() >= anyStage)
            gotoState("done")
            myLinkedRef.enable()
                        self.disable()
                        self.Delete()
                        myLinkedRef = None                   
            EnableAchiveMessage.Show()
       endif
    endEvent
endState

state done
; do nothing
; note: if ref is reenabled after this state is set, this script will not redisable it
endState

Although using OnLoad is unreliable I've heard, so I would probably just enable your reference with a papyrus fragment on your quest stage.

Posted

Thank you for teaching me!

I still didn't know how to use none lol.

I intend to use this script for my own home, so I don't see a problem with OnLoad. Players are not in their house when they complete a quest stage.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...