So I've been checking out the mission editor and began contemplating the idea of a multi-grid mission. What I mean by that is, if the Artemis approaches the right side of the Grid (Column 5), when they reach the edge, they enter the left side of a new grid (Column 1).
Each time this happens, the grid would be re-generated, all enemies in the initial grid would be removed, and the new grid would be populated.
I semi-borrowed this idea from Capt. Xavier Wise based on his awesome Warp point in the mission he is currently developing.
What I'm wondering is, would there be a way to make this scripting any easier? Currently the only way I see it to be done is to have a separate creation and death event for each enemy, and a failsafe to progress the creation of the sector in case that enemy was destroyed.
In the code below, Each enemy is given a death variable (0.0 = living, 1.0 = destroyed by player/other). The location counter acts as a step function to coordinate events, and each event increments the counter according to what should occur next.
I included the Location stepper because I couldn't think of any other way to populate a grid based on previous events, if any of you awesome people have ideas as to how I could clean this process/idea up I would appreciate it!
Here's a dropbox link to the file.
https://dl.dropbox.com/u/10193809/web/MISS_Map_Extension.xml <mission_data version="1.7" background_id_arme="">
<start name_arme="Start">
<create type="player" x="50000" y="0" z="50000" name="Artemis" />
<set_difficulty_level value="5" />
<set_skybox_index index="9" />
<big_message title="Unnamed mission" subtitle1="by Unknown Author" subtitle2="adventure for Artemis 1.7" />
<set_timer name="start_mission_timer_1" seconds="10" />
<set_variable name="chapter_1" value="1" />
<set_variable name="Location" value="1.0" />
<set_object_property property="energy" value="4000" name="Artemis" />
<set_variable name="aDead" value="0.0" />
<set_variable name="bDead" value="0.0" />
<set_variable name="cDead" value="0.0" />
<set_variable name="dDead" value="0.0" />
</start>
<folder_arme name_arme="Sector1" id_arme="87ef0b47-a402-4f10-9144-e1a98186a3a3" expanded_arme="" />
<event name_arme="CreateA" id_arme="36ca335d-3a1e-41f4-a17b-c350f1e8b419" parent_id_arme="87ef0b47-a402-4f10-9144-e1a98186a3a3">
<if_variable name="aDead" comparator="EQUALS" value="0.0" />
<if_not_exists name="A" />
<if_variable name="Location" comparator="EQUALS" value="1.0" />
<set_variable name="Location" value="2.0" />
<create type="enemy" x="58400.0" y="0.0" z="22800.0" angle="0" name="A" hullID="2000" fleetnumber="-1" />
</event>
<event name_arme="CreateAFailsafe" id_arme="b2936cfd-a8a4-4a74-b8b5-2f2cf60ffdc8" parent_id_arme="87ef0b47-a402-4f10-9144-e1a98186a3a3">
<if_variable name="aDead" comparator="EQUALS" value="1.0" />
<if_not_exists name="A" />
<if_variable name="Location" comparator="EQUALS" value="1.0" />
<set_variable name="Location" value="2.0" />
</event>
<event name_arme="DeathA" id_arme="665444a8-327c-43b8-a1df-c1a90baddaad" parent_id_arme="87ef0b47-a402-4f10-9144-e1a98186a3a3">
<if_variable name="Location" comparator="EQUALS" value="2.0" />
<if_not_exists name="A" />
<set_variable name="aDead" value="1.0" />
</event>
<event name_arme="East" id_arme="cb32e85f-03be-486b-9081-4835289297b8" parent_id_arme="87ef0b47-a402-4f10-9144-e1a98186a3a3">
<if_object_property property="positionX" name="Artemis" comparator="LESS" value="200.0" />
<if_variable name="Location" comparator="EQUALS" value="2.0" />
<set_variable name="Location" value="11.0" />
<destroy name="A" />
<set_object_property property="positionX" value="99800.0" name="Artemis" />
</event>
<folder_arme name_arme="Sector2" id_arme="f560ce73-6d17-4460-acf6-be4138b4d9df" expanded_arme="" />
<event name_arme="CreateB" id_arme="4a207900-00e2-4be7-a3d7-328d69134fff" parent_id_arme="f560ce73-6d17-4460-acf6-be4138b4d9df">
<if_variable name="bDead" comparator="EQUALS" value="0.0" />
<if_not_exists name="A" />
<if_variable name="Location" comparator="EQUALS" value="11.0" />
<set_variable name="Location" value="12.0" />
<create type="enemy" x="4000.0" y="0.0" z="46000.0" angle="0" name="B" hullID="2000" fleetnumber="-1" />
</event>
<event name_arme="CreateBFailsafe" id_arme="2b7f8531-762d-45be-8067-95da93251793" parent_id_arme="f560ce73-6d17-4460-acf6-be4138b4d9df">
<if_variable name="bDead" comparator="EQUALS" value="1.0" />
<if_not_exists name="A" />
<if_variable name="Location" comparator="EQUALS" value="11.0" />
<set_variable name="Location" value="12.0" />
</event>
<event name_arme="DeathA" id_arme="3c7b7eff-5263-46b5-afec-474657367cb6" parent_id_arme="f560ce73-6d17-4460-acf6-be4138b4d9df">
<if_variable name="Location" comparator="EQUALS" value="12.0" />
<if_not_exists name="B" />
<set_variable name="bDead" value="1.0" />
</event>
<event name_arme="West" id_arme="ed5d96ab-4581-417b-84a4-ae375b2bd367" parent_id_arme="f560ce73-6d17-4460-acf6-be4138b4d9df">
<if_object_property property="positionX" name="Artemis" comparator="GREATER" value="99900.0" />
<if_variable name="Location" comparator="EQUALS" value="12.0" />
<destroy name="B" />
<set_variable name="Location" value="1.0" />
<set_object_property property="positionX" value="200.0" name="Artemis" />
</event>
</mission_data>
[Last edited Jan 28, 2013 23:55:15]