Members | Sign In
All Forums > Mission Scripting
avatar

Why doesn't it work

posted Jun 15, 2012 00:40:11 by aaroncspock
<mission_data version="1.65" background_id_arme="">
<start name_arme="Start">
<create type="player" x="17440.0" y="0.0" z="84268.0" angle="315" name="Uss Stargazer" />
<create count="10" type="nebulas" startX="96708.0" startY="0.0" startZ="71829.0" endX="71830.0" endY="0.0" endZ="66585.0" />
<create count="10" type="nebulas" startX="71830.0" startY="0.0" startZ="66585.0" endX="72561.0" endY="0.0" endZ="51341.0" />
<create count="10" type="nebulas" startX="72561.0" startY="0.0" startZ="51341.0" endX="45122.0" endY="0.0" endZ="54512.0" />
<create count="10" type="nebulas" startX="45122.0" startY="0.0" startZ="54512.0" endX="36220.0" endY="0.0" endZ="40609.0" />
<create count="10" type="nebulas" startX="36220.0" startY="0.0" startZ="40609.0" endX="45000.0" endY="0.0" endZ="21829.0" />
<set_difficulty_level value="3" />
<create count="10" type="nebulas" startX="45000.0" startY="0.0" startZ="21829.0" endX="33049.0" endY="0.0" endZ="7073.0" />
<set_skybox_index index="9" />
<create count="20" type="nebulas" startX="33049.0" startY="0.0" startZ="7073.0" endX="7927.0" endY="0.0" endZ="1951.0" />
<big_message title="War Without End" subtitle1="by Matthew Chase" subtitle2="and Aaron Cram" />
<create count="1" type="nebulas" startX="7927.0" startY="0.0" startZ="1951.0" endX="7927.0" endY="0.0" endZ="1951.0" />
<set_timer name="start_mission_timer_1" seconds="10" />
<set_variable name="chapter_1" value="1" />
<big_message title="War Without End" subtitle1="By Matthew Chase" subtitle2="and Aaron Cram" />
<create type="station" x="4391.0" y="-10.0" z="95975.0" angle="0" name="Headquarters" raceKeys="UFP friendly" hullKeys="base Base" />
<create type="blackHole" x="26342.0" y="0.0" z="18048.0" />
<create type="blackHole" x="81830.0" y="0.0" z="44024.0" />
<create type="blackHole" x="61342.0" y="0.0" z="75853.0" />
<create type="neutral" x="13903.0" y="0.0" z="92195.0" angle="315" name="Uss Constitution" raceKeys="UFP friendly" hullKeys="fighter Battleship" />
<create type="neutral" x="12196.0" y="0.0" z="85000.0" angle="315" name="Uss Defiant" raceKeys="UFP friendly" hullKeys="fighter Battleship" />
<create type="neutral" x="4269.0" y="0.0" z="89756.0" angle="315" name="Uss Orion" raceKeys="UFP friendly" hullKeys="fighter Battleship" />
<create type="neutral" x="9391.0" y="0.0" z="95121.0" angle="315" name="Uss Constellation" raceKeys="UFP friendly" hullKeys="fighter Battleship" />
<create type="station" x="90244.0" y="0.0" z="48414.0" angle="0" name="Enemy1" raceKeys="Torgoth enemy" hullKeys="Base base" />
<create type="station" x="60488.0" y="0.0" z="33780.0" angle="0" name="Enemy2" raceKeys="Torgoth enemy" hullKeys="Base base" />
<create type="station" x="50488.0" y="0.0" z="8902.0" angle="0" name="Enemy3" raceKeys="Torgoth enemy" hullKeys="Base base" />
<create type="station" x="81708.0" y="0.0" z="79390.0" angle="0" name="DS3" raceKeys="UFP friendly" hullKeys="Base base" />
<create type="station" x="38293.0" y="0.0" z="64634.0" angle="0" name="DS2" raceKeys="UFP friendly" hullKeys="Base base" />
<create type="station" x="14757.0" y="0.0" z="27073.0" angle="0" name="DS1" raceKeys="UFP friendly" hullKeys="Base base" />
<create type="neutral" x="16952.0" y="0.0" z="73170.0" angle="305" name="Uss Kelvin" raceKeys="UFP friendly" hullKeys="fighter Battleship" />
<create type="neutral" x="14757.0" y="0.0" z="67317.0" angle="305" name="Uss Kepler" raceKeys="UFP friendly" hullKeys="fighter Battleship" />
<create type="neutral" x="12927.0" y="0.0" z="72439.0" angle="305" name="Uss Intrepid" raceKeys="UFP friendly" hullKeys="fighter Battleship" />
<create type="enemy" x="58049.0" y="0.0" z="47560.0" angle="315" name="TGH Klothos" raceKeys="Torgoth enemy" hullKeys="fighter Battleship" fleetnumber="1" />
<create type="enemy" x="55732.0" y="0.0" z="36219.0" angle="315" name="TGH Somraw" raceKeys="Torgoth enemy" hullKeys="fighter Battleship" fleetnumber="1" />
<create type="enemy" x="44757.0" y="0.0" z="30853.0" angle="315" name="TGH Buruk" raceKeys="Torgoth enemy" hullKeys="fighter Battleship" fleetnumber="1" />
<create type="anomaly" x="1464.0" y="0.0" z="975.0" name="1" />
<create type="anomaly" x="98903.0" y="0.0" z="98780.0" name="2" />
<create type="anomaly" x="488.0" y="0.0" z="99146.0" name="5" />
<create type="anomaly" x="366.0" y="0.0" z="49390.0" name="6" />
<create type="anomaly" x="57805.0" y="0.0" z="99146.0" name="4" />
<create type="anomaly" x="92805.0" y="0.0" z="98536.0" name="3" />
<incoming_comms_text from="Headquarters">Uss Stargazer, the Uss Kepler is going to lead two Battleships through the Klingon Neutral Zone to discuss a peace treaty with the Torgoths, regarding the size of their space. Your mission is to assist the Uss Kepler and the two ships if needed. If no assistance is needed you are to stay and protect the base. -Headquarters</incoming_comms_text>
<incoming_comms_text from="Uss Kepler">Good luck protecting the base, we will signal if assistance is needed. -Uss Kepler^</incoming_comms_text>
<set_object_property property="canBuild" value="1" name="Headquarters" />
<set_object_property property="canBuild" value="1" name="DS3" />
<set_object_property property="canBuild" value="1" name="DS2" />
<set_object_property property="canBuild" value="1" name="DS1" />
<destroy name="1" />
<set_timer name="Destroy 1" seconds="3" />
<add_ai type="POINT_THROTTLE" value1="48273" value2="0" value3="42629" value4="20.0" name="Uss Kepler" />
<set_relative_position name2="Uss Kelvin" distance="5000" angle="225.0" name1="Uss Kepler" />
<set_relative_position name2="Uss Intrepid" distance="2500" angle="200.0" name1="Uss Kepler" />
</start>
<event id_arme="4e8c8317-1109-4a69-a8fb-f9ada671a5ee">
<if_inside_sphere name="Uss Kepler" centerX="54031" centerY="0" centerZ="37792" radius="15000" />
<if_variable name="DistressCall_UssKepler" comparator="NOT" value="1.0" />
<if_not_exists name="1" />
<set_variable name="DistressCall_UssKepler" value="1.0" />
<set_object_property property="systemDamageFrontShield" value="100.0" name="Uss Kelvin" />
<set_object_property property="systemDamageBackShield" value="100.0" name="Uss Kelvin" />
<set_object_property property="systemDamageFrontShield" value="100.0" name="Uss Kepler" />
<set_object_property property="systemDamageBackShield" value="100.0" name="Uss Kepler" />
<set_object_property property="systemDamageFrontShield" value="100.0" name="Uss Intrepid" />
<set_object_property property="systemDamageBackShield" value="100.0" name="Uss Intrepid" />
<incoming_message from="U.S.S. Kepler" fileName="Copy of Kepler Distress Call - YouTube.MP3" mediaType="0" />
<warning_popup_message message="Uss Kepler Distress Call" consoles="M" />
<set_object_property property="systemDamageFrontShield" value="90.0" name="Uss Kepler" />
<set_object_property property="systemDamageFrontShield" value="90.0" name="Uss Kelvin" />
<set_object_property property="systemDamageFrontShield" value="90.0" name="Uss Intrepid" />
<set_timer name="Head_message" seconds="1" />
<destroy name="2" />
<set_object_property property="eliteAbilityBits" value="0.0" />

This is only the first event but there's a few problems that keep happening. First the 3 ships that I want to go to the "escourts" don't go together and sometimes they just stop. The second is when, by some miracle, they all get there the game stops and shuts down. Please help

P.S. What is the difference when a variable has the != or just =
page   1
5 replies
avatar
DwayneShaffer said Jun 15, 2012 14:21:24
I believe the reason the game shut down is because the game only supports 2 types of media file the wave and Ogg audio files so when the game gets to this point it's trying to run a file that it does not understand and shuts down.

2nd if you want to have ship meet I found that the best way is use the target_throttle command this will direct your ships to the target ship here is an example below.

<event id_arme="34987cf9-2e10-41b8-9c0f-d26aabbca9e4">
<if_exists name="Celestra" />
<if_variable name="Libran" comparator="NOT" value="1.0" />
<add_ai type="TARGET_THROTTLE" targetName="Libran" value1="0.4" name="Celestra" />
<set_variable name="Libran" value="1.0" />
</event>

3rd variable
= is normally the variable that is currently set
!= means not set but is normally followed by set_variable command

Hope this helps


Dwayne Shaffer C.O.
Vidar GSR 3701
C.D.F. 7th Fleet
http://vidar-gsr-3701.webs.com/
avatar
aaroncspock said Jun 15, 2012 15:54:04
Thank you! I'm evidently still learning how this all works and knowing what is wrong definitely helps. Thanks
avatar
aaroncspock said Jun 16, 2012 02:35:14
I did what you said and everything is fixed, except the sound file still doesn't play. If it helps I downloaded the sound off of youtube and then changed the extention to ogg. Could that affect it?
avatar
DwayneShaffer said Jun 16, 2012 05:15:58
There are 2 types of .ogg file one is a video and the other is a audio and to the best of my knowledge the audio is the only one that can be used. What program are you using to convert the file the one I am using is audacity a free program that has allot of functions so many that I still have figure them all out (lol). This is also the recommended program by Mike one of the leading script writers here. I provided a link to it here

http://audacity.sourceforge.net/
Dwayne Shaffer C.O.
Vidar GSR 3701
C.D.F. 7th Fleet
http://vidar-gsr-3701.webs.com/
avatar
Mike_Substelny said Jun 20, 2012 20:28:42
Dwayne is right - you don't just need to change the extension you actually need to convert the audio file to an ogg. Use Audacity, make sure the file in the right location, and your problem should be solved.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
Login below to reply: