[v2.0] Dropping an Object
After reading the following tutorial, please go over the latest explanations under the designer document. There are some enhancements and restrictions.
Mission-X v2.0 implements a simple "free fall" drop mechanism. The beauty of this feature is that you can define number of targets as "hit-able" by the dropped object.
Before I'll dwell on how to use this feature, I take it for granted that you understand how to write simple missions or aware of the plugin syntax.
First: <drop_object> element is a new sub element under "step_settings". We use this element to define the object we can drop from our plane.
Its attributes are:
num_of_tries = how many tries we have before failing.
file_name = 3D Obj file that represents the fallen object.
file_name_on_ground = The obj file to display when item reaches the ground.
radius_mt = radius of effect in meters.
fail_can_continue = If all attempts fails, should the mission abort ?
This is the main drop element attributes we need to configure in the first stage.
<drop_object num_of_tries="10" file_name="Mark_red.obj" file_name_on_ground="" radius_mt="50" fail_can_continue="0" >
Second Step:
Define the targets that are "Hit-able".
This is done using the sub element "target".
Here is an example:
Before I'll dwell on how to use this feature, I take it for granted that you understand how to write simple missions or aware of the plugin syntax.
First: <drop_object> element is a new sub element under "step_settings". We use this element to define the object we can drop from our plane.
Its attributes are:
num_of_tries = how many tries we have before failing.
file_name = 3D Obj file that represents the fallen object.
file_name_on_ground = The obj file to display when item reaches the ground.
radius_mt = radius of effect in meters.
fail_can_continue = If all attempts fails, should the mission abort ?
This is the main drop element attributes we need to configure in the first stage.
<drop_object num_of_tries="10" file_name="Mark_red.obj" file_name_on_ground="" radius_mt="50" fail_can_continue="0" >
Second Step:
Define the targets that are "Hit-able".
This is done using the sub element "target".
Here is an example:
<drop_object num_of_tries="10" file_name="Mark_red.obj" file_name_on_ground="" radius_mt="50" >
<target name="zone_3" />
</drop_object>
<target name="zone_3" />
</drop_object>
The target name must be one of the step_goals in the current step.
You can define multiple <target> sub elements for <drop_object>, but in most cases you just have one target.
Third Step:
Make sure that the target knows that it has to be HIT.
The following example is a hit-able "static_target". In v2.0 we have a specialized sub-element by the name "<hit ...>" that allow us to extend the target behavior.
Here is an example:
You can define multiple <target> sub elements for <drop_object>, but in most cases you just have one target.
Third Step:
Make sure that the target knows that it has to be HIT.
The following example is a hit-able "static_target". In v2.0 we have a specialized sub-element by the name "<hit ...>" that allow us to extend the target behavior.
Here is an example:
<static_target id="1" name="zone_3" lat="35.544853" long="-84.353416" success_distance_nm="0.2" >
<hit calc_radius_of_hit_from="target" />
<event name="onHit" >
<msg repeat_every_visit="0" ><![CDATA[Very good, you Hit zone_3;]]></msg>
</event>
</static_target>
<hit calc_radius_of_hit_from="target" />
<event name="onHit" >
<msg repeat_every_visit="0" ><![CDATA[Very good, you Hit zone_3;]]></msg>
</event>
</static_target>
Explanation:
Here is the full Step example:
- We Have a static target by the name "zone_3". Its success radius is: "0.2nm".
- "zone_3" have a sub-element by the name: "<hit>" which turns the target to a "hit-able" in order to achieve it.
- The plugin needs to construct the success area, it does it by using the following attribute:
> "calc_radius_of_hit_from": if it's value is "target", then it uses "success_distance_nm" as the radius of success (hit).
if it's value is "source" then it base the success radius (hit) on the drop object radius of effect which defined in attribute: "radius_mt" of the dropped object.
Here is the full Step example: