Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment   Page 2 of 2      Prev   1   2
Dave Thaler

Registered:
Posts: 503
Reply with quote  #16 
It's working fine for me.  Can you email me your DMXcommands.xml file?
Jafo

Registered:
Posts: 2
Reply with quote  #17 

Is there a way of using random values in a cue? I'd like to have a strobe light flash several times when the ship gets hit, but I'd like the pattern to be a bit different each time.

What I'm trying to avoid is the flashing pattern to be seen as a pattern. After a few hits, it would become predictable.

Can anyone think of a way to get a different flash pattern with each hit?

Dave Thaler

Registered:
Posts: 503
Reply with quote  #18 
> Can anyone think of a way to get a different flash pattern with each hit?

In general, no.  The DMXcommands file is static, and the rules are deterministic, so you can't really get what you want.   However, IF you could force yourself to get hit at the start of a mission (such as in a mission script you create or modify), then you CAN get that sort of effect with some trickery, using the time at which you get hit as the source of randomness with two or three events in your DMXcommands file as follows:

1) use a continuous NORMAL_CONDITION_1 event with a long stream of seemingly random flashes that you manually craft beforehand.  This should go on for far longer than you want for any single hit.
2) use a non-continuous SOMETHING_HITS_PLAYER event, which must appear AFTER the first event in your DMXcommands file.  This event, which will serve to mask off the first event, will have two timeblocks.  The first timeblock has no values in it, for the duration you want the flashing to occur.   The second timeblock should have an extremely long duration (longer than a game could last) and set the values to 0.   As a result, each time this event fires, the flashing from the first event becomes visible (starting at whatever midpoint in the sequence the timing turns out to be) and then the flashing stops after the first timeblock ends.
3) if you DON'T want the flashing when the game starts and the mission triggers the event for no reason other than to get apparent randomness later, then add a third event to mask the flashing initially even though the event fires.  This can be a non-continuous NORMAL_CONDITION_1 event that sets the values to 0 for a duration equal to or greater than the length of the first timeblock in SOMETHING_HITS_PLAYER.  This event must appear AFTER both of the previous two events in the DMXcommands file.
Jafo

Registered:
Posts: 2
Reply with quote  #19 
Wow, that's some badass info. And it's a lot to take in. Once I get my components, I can learn the basics then get more sophisticated as I go. I'm sure I'll be referring back to this frequently.

Thanks for all the info.
eurobusker

Registered:
Posts: 108
Reply with quote  #20 
I got the energy levels working like this

<!-- ********************************************************************************************* -->
<event type="NORMAL_CONDITION_1" continuous="yes">

<!-- steady soft white light -->
<timeblock mseconds="1000">
<setvalue index="2" value="100" change="0"/>
<setvalue index="3" value="100" change="0"/>
<setvalue index="4" value="100" change="0"/>
<setvalue index="7" value="100" change="0"/>
<setvalue index="8" value="100" change="0"/>
<setvalue index="9" value="100" change="0"/>
<setvalue index="30" value="0" change="0"/>
<!-- value of energy low light -->
<setvalue index="31" value="0" change="0"/>
<!-- value of energy 200 light -->
<setvalue index="32" value="0" change="0"/>
<!-- value of energy 100 console-->
<setvalue index="33" value="0" change="0"/>
<!-- value of energy 80 light -->
<setvalue index="34" value="0" change="0"/>
<!-- value of energy 60 light -->
<setvalue index="35" value="0" change="0"/>
<!-- value of energy 40 light -->
<setvalue index="36" value="0" change="0"/>
<!-- value of energy 20 light -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->
<event type="ENERGY_200" continuous="yes">

<!-- console hit lights -->
<timeblock mseconds="1000">
<setvalue index="31" value="200" change="0"/>
<!-- value of energy 200 light -->
</timeblock>
</event>
<!-- ********************************************************************************************* -->
<event type="ENERGY_100" continuous="yes">

<!-- console hit lights -->
<timeblock mseconds="1000">
<setvalue index="32" value="200" change="0"/>
<setvalue index="31" value="0" change="0"/>
<!-- value of energy 100 console-->
</timeblock>
</event>
<!-- ********************************************************************************************* -->
<event type="ENERGY_80" continuous="yes">

<!-- console hit lights -->
<timeblock mseconds="1000">
<setvalue index="33" value="200" change="0"/>
<setvalue index="32" value="0" change="0"/>
<!-- value of energy 80 console-->
</timeblock>
</event>
<!-- ********************************************************************************************* -->
<event type="ENERGY_60" continuous="yes">

<!-- console hit lights -->
<timeblock mseconds="1000">
<setvalue index="34" value="200" change="0"/>
<setvalue index="33" value="0" change="0"/>
<setvalue index="30" value="0" change="0"/>
<!-- value of energy 60 console-->
</timeblock>
</event>
<!-- ********************************************************************************************* -->
<event type="ENERGY_40" continuous="yes">

<!-- console hit lights -->
<timeblock mseconds="1000">
<setvalue index="35" value="200" change="0"/>
<setvalue index="34" value="0" change="0"/>
<!-- value of energy 40 console-->
</timeblock>
</event>
<!-- ********************************************************************************************* -->
<event type="ENERGY_20" continuous="yes">

<!-- console hit lights -->
<timeblock mseconds="1000">
<setvalue index="36" value="200" change="0"/>
<setvalue index="35" value="0" change="0"/>
<!-- value of energy 20 light -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->
<event type="ENERGY_LOW" continuous="yes">

<!-- console hit lights -->
<timeblock mseconds="1000">
<setvalue index="30" value="200" change="0"/>
<!-- value of energy low light -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->

The idea is to turn off the last light when recharging, the stacking works fine and the recharging at a station turns off the lower light.

The nuke ready works too if you set it as off at the beginning for condition normal

<!-- ********************************************************************************************* -->
<event type="NORMAL_CONDITION_1" continuous="yes">

<!-- steady soft white light -->
<timeblock mseconds="1000">
<setvalue index="2" value="100" change="0"/>
<setvalue index="3" value="100" change="0"/>
<setvalue index="4" value="100" change="0"/>
<setvalue index="7" value="100" change="0"/>
<setvalue index="8" value="100" change="0"/>
<setvalue index="9" value="100" change="0"/>
<!-- light value of damcom hit light -->
<setvalue index="38" value="0" change="0"/>
<!-- value of nuke ready light -->
<setvalue index="39" value="0" change="0"/>
<!-- value of tube 1 light -->
<setvalue index="40" value="0" change="0"/>
<!-- value of tube 2 light -->
<setvalue index="41" value="0" change="0"/>
<!-- value of tube 3 light -->
<setvalue index="42" value="0" change="0"/>
<!-- value of tube 4 light -->
<setvalue index="43" value="0" change="0"/>
<!-- value of red alert light -->
<setvalue index="44" value="0" change="0"/>
<!-- value of damcom casualty light -->
<setvalue index="45" value="0" change="0"/>
<!-- value of damcom killed light -->
<setvalue index="46" value="0" change="0"/>
<!-- value of unloading tube light -->
<setvalue index="47" value="0" change="0"/>
<!-- value of loading tube light -->
</timeblock>
</event>

<!-- ********************************************************************************************* -->
<event type="NUKE_READY_TO_FIRE" continuous="yes">

<!-- console hit lights -->
<timeblock mseconds="1000">
<setvalue index="38" value="200" change="0"/>
<!-- value of nuke ready light -->
</timeblock>
</event>

davisn456

Registered:
Posts: 294
Reply with quote  #21 
Quote:
Originally Posted by eurobusker
I got the energy levels working like this


So you're doing yours like a gas tank indicator with multiple lights, correct? I've been trying to do that with a single light for a while and haven't had much luck with it. Your solution may work for something else I'm working on...thanks for posting your sample code!!
eurobusker

Registered:
Posts: 108
Reply with quote  #22 
actually it's for a single lite out the seven leds, however, the idea of having all lit when full could be cool.
I'll have to try that too. In fact they could all be lit at normal when full and turned off when the power goes down. it's roughly the same code, but instead of swithing on the leds it switches them off... I'll try it tomorrow.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.