Nexussux! Posted September 11, 2021 Posted September 11, 2021 Above is a custom quest Alias editor. As I understand it now, the "ASDPlayerAliasScript" is attached to the Player actor and is constantly running as long as the quest is active. Is this correct? Will it execute OnEvent functions, i.e. OnSpellCast?
Guest Posted September 11, 2021 Posted September 11, 2021 Scripts execute events only for each specific condition. For example all scripts will run the OnStart() event. All of them. OnPlayerLoadGame is executed only for scripts attached to a referencealias that has the Player as reference. OnUpdate is executed by all scripts that are not fragments that call the RegisterForUpdate and RegisterForSingleUpdate. The OnSpellCast is called if the script is attahced to a referencealias or an actor.
Nexussux! Posted September 11, 2021 Author Posted September 11, 2021 5 minutes ago, CPU said: Scripts execute events only for each specific condition. For example all scripts will run the OnStart() event. All of them. OnPlayerLoadGame is executed only for scripts attached to a referencealias that has the Player as reference. OnUpdate is executed by all scripts that are not fragments that call the RegisterForUpdate and RegisterForSingleUpdate. The OnSpellCast is called if the script is attahced to a referencealias or an actor. Thank you! So basically the script under "Papyrus" is effectively running on infinite loop with player as the ref? Does this script keep executing after the quest is marked as "completed"?
Guest Posted September 11, 2021 Posted September 11, 2021 Scripts never run in an infinite loop. They will only process events when they happen. If I remember correctly, the "completed" flag has no relevance for the scripts. I think is the "active" flag. But here my memory is not fresh.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.