Jump to content

[LE] Transform Script Help


Chrimison

Recommended Posts

Hello, I recently came back to modding and i think I took on something too much for me at this point. I'm trying to create a script where when I tell my NPC to transform via quest dialog.

 

The script is suppose to tell the NPC to switch from 1 custom character to another. the part I'm struggling with is if the Extends part. I'm unsure if it extends actor or extends quest. I'm also having trouble with picking the right event name. My original script I made a few years ago had conditions on the transform. This one doesn't.

 

Any help at all would be great at this point.

Link to comment
Share on other sites

If the script is placed on the actor and the function to transform it was on that script the script extends actor.

Scriptname sometransformscript extends Actor
{ this script is placed on an actor }
 
; some transform code here..

But what if you have the function to transform on another script, like a quest, but the script you want to call that function in, will be on actor?

Scriptname sometransformscript extends Actor
{ this script is placed on an actor }
 
Quest property someQuest auto
 
; some event..
(someQuest as someQuestScript).myTransformFunction()
; end some event
 

But what if you want all of this to happen on a quest instead and place no script on an actor.

1. Make the actor an alias of the quest

2. Make the ReferenceAlias property on the quest script.

Scriptname somequestscript extends Quest
{ script attached to a quest for transform logic stuff }
ReferenceAlias property myActorAlias auto
; may need to call some functions on this alias just in case.
 
; some transform function that is called from a quest stage or some other means..

The above is a good way to avoid directly attaching scripts to actors(compatibility issues). It's not recommended unless it's your own actor.. or a there's a real good reason to attach one to a vanilla actor.

Edited by Rasikko
Link to comment
Share on other sites

  • Recently Browsing   0 members

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