Stingray Forum (Read Only)
Welcome to Autodesk’s Stingray Forums. Share your knowledge, ask questions, and explore popular Stingray topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trigger Multiple Units

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
RSK
Enthusiast
531 Views, 3 Replies

Trigger Multiple Units

Hi,

 

In level flow I have made a simple flows that triggers visibility and animation for a single level unit, like a door for example. 

How do I trigger multiple units from the same trigger? Do I have to put in "level unit" nodes for each and all of them or can i group units together somehow? Something like 50 lights turning on at the same time

 

Best regards,

Rolf

 

3 REPLIES 3
Message 2 of 4
paul.kind
in reply to: RSK

This can be done in a multitude of ways.

 

If you are going to be triggering a large quantity of lights, the easiest way would be to set a global variable in your flow somewhere.  like a bool with the name "lights_active" and set it to false on start.  then whenever something is triggered that variable gets set to true.  Then in your lights unit flow, you could check that variable every frame and enable the lights when true.  This is not the most efficient way but would work fine in most cases and would work easily.

 

Another similar method with more control would be to set your lights every frame to a global value...  something like numeric glabla, "light_intensity" 0.  You can then set this variable in your level flow.  On each frame in your unit flow, just set the light(s) intensity to this global variable.  This would allow you to effectively dim all the lights in your scene.

 

For both of these examples you would want your light fixtures to contain the lights to be affected. This way the lights can be controlled from that units flow.  Typically this is how i deal with lights.  I make the model of my light fixture, add a light to that object and export it to stingray with the light included.  Because the light is part of the unit, i can just write the light control stuff into the unit and have a very easy time of it.

 

Hope this helps.

 

Feel free to inquire further if something does not make sense.

Paul

 

 

 

Areas of Expertise - MayaLT : Mudbox : 3DS Max : Inventor : Game Dev
Follow me on Twitter : @paulkind3d

Please remember to give kudos freely and mark acceptable answers as solved!

PLEASE do not send me private messages unless asked to do so. If you have a question, start a thread, and ask me on the public forums where answering your question may help others.

Did you know there was a YouTube learning channel for Autodesk Games? New videos are posted regularly with all sorts of content relative to Stingray, Maya/MayaLT, 3DS Max, and other game related tools. Get your game on @ https://www.youtube.com/user/autodeskgameshowtos
Message 3 of 4
RSK
Enthusiast
in reply to: paul.kind

Thanks Paul for your suggestions - will have to play around with these solutions.

 

Can I use the same approach if I want different things to happen on a single trigger, like for example run a door animation, play a sound, fade in lights and move an object simultaniously?

 

If I understand your post correct both methods will have these units constantly checking/listening for a value. Will that not give performance issues or is that simply how to do it in game-making? As you might have guessed I have no experience with game engines...

 

Best regards,

Rolf

Message 4 of 4
Shanii2
in reply to: RSK

The triggering events are quite efficient for dynamic game calls , and works well. for multiple stuff. It follows various paths of what you want. if things have to done simultaneously in succession or one by one in sequence. Then you can use sequence node to fire the other stuff with single trigger call. or you can control multiple stuff happening around in the scene. like dimming lights, doors closed, zombies spawning.  then as paul explained you can do this with set of global variables along with unit script data to update the scene, with the single trigger. For former approach following tutorial might be helpful.

 

https://www.youtube.com/watch?v=My2zA9oaZFo

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report