Cue Instantiation
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Cue Instantiation
This is something that has bothered me for a long time. Why does having a cue set to instantiate not actually create new instances of that cue? Instead you have to create a library of what you want instantiated, then make a cue that references that library. It kind of seems likes instantiate functions no different from <reset_cue> in its current form.
you dont have to make a lib if you want to instantiate them. works fine without that. supericially it mal look the same as reset_cue, but there are some key differences:
=> if the instantiated cue is also the namespace then each instance will have its seperate set of variables. If you use <reset_cue> then you might have values from previous runs in them (i think)
=> if an event triggers multiple times per frame (for example attacked event on multiple objects and a Area Damage Missile strikes all of them simultaneously) then the instantiated cue will spawn multiple instances in that frame, accounting for every event. If you use <reset_cue/> it might only account for the first Event because when the event is re-registered on the Group the Attack is already over.
=> Instantiated cues can have sub-cues if you want to have follow-ups. If you use <reset_cue> you technically can also have sub-cues, but you reset them each time before they can trigger, so its like they are not there..
thats the ones that come spontaneously to mind..
=> if the instantiated cue is also the namespace then each instance will have its seperate set of variables. If you use <reset_cue> then you might have values from previous runs in them (i think)
=> if an event triggers multiple times per frame (for example attacked event on multiple objects and a Area Damage Missile strikes all of them simultaneously) then the instantiated cue will spawn multiple instances in that frame, accounting for every event. If you use <reset_cue/> it might only account for the first Event because when the event is re-registered on the Group the Attack is already over.
=> Instantiated cues can have sub-cues if you want to have follow-ups. If you use <reset_cue> you technically can also have sub-cues, but you reset them each time before they can trigger, so its like they are not there..
thats the ones that come spontaneously to mind..
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Oh, so that's why some cues have "namespace=this". It seems like default namespace makes instantiated cues retain variables even if they don't have a parent cue to store them...UniTrader wrote: => if the instantiated cue is also the namespace then each instance will have its seperate set of variables. If you use <reset_cue> then you might have values from previous runs in them (i think)
in that case the static cue is the namespace i guess.. did you read the MD Guide for XR?
https://www.egosoft.com/download/x_rebi ... rGuide.pdf
https://www.egosoft.com/download/x_rebi ... rGuide.pdf
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Yes, along time ago and just recently to look up that namespace stuff. It's not something I'm used to. The other scripting languages I've used in the past such as Javascript and Squirrel just handle variable scope fully on their own.UniTrader wrote:in that case the static cue is the namespace i guess.. did you read the MD Guide for XR?
https://www.egosoft.com/download/x_rebi ... rGuide.pdf