EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
Cue Instantiation
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
Clownmug





Joined: 11 Dec 2013
Posts: 183 on topic

Thank you for registering your game
PostPosted: Fri, 10. Aug 18, 16:00    Post subject: Cue Instantiation Reply with quote Print

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.

Back to top
View user's profile Send private message
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)

MEDAL

Joined: 20 Nov 2005
Posts: 13807 on topic

Thank you for registering your game
PostPosted: Fri, 10. Aug 18, 21:15    Post subject: Reply with quote Print

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 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 Wink

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help Wink
Back to top
View user's profile Send private message
Clownmug





Joined: 11 Dec 2013
Posts: 183 on topic

Thank you for registering your game
PostPosted: Fri, 10. Aug 18, 22:17    Post subject: Reply with quote Print

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)


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...

Back to top
View user's profile Send private message
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)

MEDAL

Joined: 20 Nov 2005
Posts: 13807 on topic

Thank you for registering your game
PostPosted: Sat, 11. Aug 18, 00:05    Post subject: Reply with quote Print

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_rebirth/files/XRMissionDirectorGuide.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 Wink

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help Wink
Back to top
View user's profile Send private message
Clownmug





Joined: 11 Dec 2013
Posts: 183 on topic

Thank you for registering your game
PostPosted: Sun, 12. Aug 18, 03:33    Post subject: Reply with quote Print

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_rebirth/files/XRMissionDirectorGuide.pdf


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.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Control Panel
Login Data
The time now is Tue, 18. Sep 18, 15:50

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.09786 seconds, sql queries = 20