Jump to content

[LE] What is the best way to move one Alias around?


Recommended Posts

I am still new to this and I have forgotten a lot about using Aliases, and spent almost the whole day trying to make a bunch of triggers share 1 objective marker. I couldn't find a way to do this using only Radiant Quest methods, I ended up doing this almost entirely with scripts.

 

The idea is I want to use triggers, that do stuff like disable themselves, and I want to mark only 1 at a time in no particular order so the player can find em all. I have a functioning script, but I hate the possibility of spazzing out the Papyrus engine and would like to do this in the cleanest way possible.

 

 

 

Function AliasSwitch()
	if Obj01.IsEnabled()
		self.ForceRefTo(Obj01)
	elseif Obj02.IsEnabled()
		self.ForceRefTo(Obj02)
	elseif Obj03.IsEnabled()
		self.ForceRefTo(Obj03) 
	elseif Obj04.IsEnabled()
		self.ForceRefTo(Obj04)
	elseif Obj05.IsEnabled()
		self.ForceRefTo(Obj05)
	elseif Obj06.IsEnabled()
		self.ForceRefTo(Obj06)
	else
		self.Clear()
	endif
endFunction 

 

 

 

This script runs on an Alias, any trigger I use will run the AliasSwitch() function. This will change the Alias if the marked trigger is activated, and skip to the next remaining trigger.

 

Do you think I nailed it? Or is this just a terrible way of accomplishing this?

Link to comment
Share on other sites

I think this is a simplest way to this, plus it has an advantage compare with having an 'Alias' for each trigger box and handle the 'Alias' through stages, you save / use less memory.

Link to comment
Share on other sites

Thanks a bunch!

 

I guess my research paid off then, just had to be sure I wasn't doing it weird. I feel like it should be simpler just to move an objective marker to multiple aliases, especially since they are all the same form.

 

I haven't released a mod yet, but I have scrapped a few, so this time I have to move past just making things work. I want to do this efficiently, and elegantly so it will behave around other mods, and won't screw with peoples saves.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...