Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
nschlein

Registered:
Posts: 35
Reply with quote  #1 

I have a larger mission that I'm working on for my library, and started testing a piece that I thought was a slam dunk...except it isn't working fully.  I'm working in the Mission Editor, using the most recent version.

The idea is the players have picked up a computer virus, and each system is being knocked out one random node at a time.  The code works fine...except for two things.

First, it never knocks a system down to 0%.  I've gotten impulse to 16% and everything else drops to a minimum of 25%, even after letting it cycle for 15 minutes.  My only guess is that it has to do with the DamCon teams (which are also being elimintated, and have their own error). 

Here is one system's worth of the offending code; TimeWeap is established in the Start block.

<event name="Weapons Infected" id_arme="ffd91ed8-48fd-4122-82e0-e989a0ba2671">
  <if_variable name="VirusWeap" comparator="EQUALS" value="1.0" />
  <if_variable name="SysWeap" comparator="EQUALS" value="0.0" />
  <if_variable name="NodeWeap" comparator="EQUALS" value="0.0" />
  <if_variable name="NodeWeapMore" comparator="EQUALS" value="0.0" />
  <if_variable name="Virus" comparator="EQUALS" value="1.0" />
  <set_variable name="SysWeap" randomIntLow="1" randomIntHigh="4" />
  <set_variable name="NodeWeap" randomIntLow="1" randomIntHigh="4" />
  <set_variable name="NodeWeapMore" randomIntLow="5" randomIntHigh="10" />
  <set_timer name="CorruptWeap" seconds="TimeWeap" />
</event>

<event name="Beam Downgrade" id_arme="519bdc32-6b8b-4cf9-a076-8fbf56bb3b77">
  <if_timer_finished name="CorruptWeap" />
  <if_variable name="SysWeap" comparator="EQUALS" value="1.0" />
  <if_variable name="NodeWeap" comparator="NOT" value="0.0" />
  <if_variable name="NodeWeapMore" comparator="NOT" value="0.0" />
  <set_player_grid_damage value="1.0" name="Artemis" index="NodeWeap" systemType="systemBeam" countFrom="front" />
  <set_player_grid_damage value="1.0" name="Artemis" index="NodeWeapMore" systemType="systemBeam" countFrom="front" />
  <set_variable name="NodeWeap" value="0.0" integer="yes" />
  <set_variable name="NodeWeapMore" value="0.0" integer="yes" />
  <set_variable name="SysWeap" value="0.0" integer="yes" />
</event>

<event name="Torpedo Downgrade" id_arme="43405ab1-14c1-4674-9866-8ff5549085a9">
  <if_timer_finished name="CorruptWeap" />
  <if_variable name="SysWeap" comparator="EQUALS" value="2.0" />
  <if_variable name="NodeWeap" comparator="NOT" value="0.0" />
  <if_variable name="NodeWeapMore" comparator="NOT" value="0.0" />
  <set_player_grid_damage value="1.0" name="Artemis" index="NodeWeap" systemType="systemTorpedo" countFrom="front" />
  <set_player_grid_damage value="1.0" name="Artemis" index="NodeWeapMore" systemType="systemTorpedo" countFrom="front" />
  <set_variable name="NodeWeap" value="0.0" integer="yes" />
  <set_variable name="NodeWeapMore" value="0.0" integer="yes" />
  <set_variable name="SysWeap" value="0.0" integer="yes" />
</event>


<event name="Front Shields Downgrade" id_arme="a118f621-eaef-40cf-bed2-ade922ae1789">
  <if_variable name="SysWeap" comparator="EQUALS" value="3.0" />
  <if_variable name="NodeWeap" comparator="NOT" value="0.0" />
  <if_timer_finished name="CorruptWeap" />
  <if_variable name="NodeWeapMore" comparator="NOT" value="0.0" />
  <set_player_grid_damage value="1.0" name="Artemis" index="NodeWeap" systemType="systemFrontShield" countFrom="front" />
  <set_player_grid_damage value="1.0" name="Artemis" index="NodeWeapMore" systemType="systemFrontShield" countFrom="front" />
  <set_variable name="NodeWeap" value="0.0" integer="yes" />
  <set_variable name="NodeWeapMore" value="0.0" integer="yes" />
  <set_variable name="SysWeap" value="0.0" integer="yes" />
</event>


<event name="Rear Shields Downgrade" id_arme="3e36637e-6293-4466-9530-d9f3994e2bea">
  <if_object_property property="systemCurEnergyBackShield" name="Artemis" comparator="GREATER_EQUAL" value="0.06" />
  <if_variable name="SysWeap" comparator="EQUALS" value="4.0" />
  <if_variable name="NodeWeap" comparator="NOT" value="0.0" />
  <if_timer_finished name="CorruptWeap" />
  <if_variable name="NodeWeapMore" comparator="NOT" value="0.0" />
  <set_player_grid_damage value="1.0" name="Artemis" index="NodeWeap" systemType="systemBackShield" countFrom="front" />
  <set_player_grid_damage value="1.0" name="Artemis" index="NodeWeapMore" systemType="systemBackShield" countFrom="front" />
  <set_variable name="NodeWeap" value="0.0" integer="yes" />
  <set_variable name="NodeWeapMore" value="0.0" integer="yes" />
  <set_variable name="SysWeap" value="0.0" integer="yes" />
</event>


EDIT:
I fixed one of the DamCon team problems, but still have this oddity happening. 

In addition to damaging systems, I'm disabling all of the DamCon teams, one at a time.  The code for disabling the teams now works.  However, I was trying to save their value to a variable and then recall it later once the virus is isolated from Comms.  The two events are simply repeating endlessly, from the very start.  I have three versions of the following, one for each team:

<event name="DamCon Team 0 Count Increase Saved" id_arme="5191e9e8-417b-443b-8381-e8b10a058e8f" parent_id_arme="f86549d8-820c-438e-9477-4c85c83cab2d">
  <if_variable name="TeamADisabled" comparator="NOT" value="1.0" />
  <if_damcon_members name="Artemis" team_index="0" comparator="NOT" value="TeamA" />
  <if_damcon_members name="Artemis" team_index="0" comparator="GREATER" value="TeamA" />
  <set_variable name="TeamA" value="TeamA+1" integer="yes" />
</event>

<event name="DamCon Team 0 Count Decrease Saved" id_arme="fceed274-6194-407d-a2ca-2064aaba2940" parent_id_arme="f86549d8-820c-438e-9477-4c85c83cab2d">
  <if_variable name="TeamADisabled" comparator="NOT" value="1.0" />
  <if_damcon_members name="Artemis" team_index="0" comparator="NOT" value="TeamA" />
  <if_damcon_members name="Artemis" team_index="0" comparator="LESS" value="TeamA" />
  <set_variable name="TeamA" value="TeamA-1" integer="yes" />
</event>


Can anyone tell me what is up?  I have repeat variants of the Weapons code for Helm and Science.  Engineering has something else, which is working just fine.

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.