Members | Sign In
All Forums > Mission Scripting

Enemy Script Points

posted Jul 25, 2013 16:44:39 by TravisHead
Thought I would share a couple of items I have learned recently with enemies and mission scripting.
If there is a better repository please let me know.

-disabling enemy shields works IF you use a separate event than the one used to create the ship.
I had heard this separate event issue before but this is the first reproducable time I have seen it.
I had to use the Set Property/Shield State Front (and back) rather than "shield state off" property on enemy ships.

-I cannot stop an enemy from shooting torps or manipulate vessel capabilities without modifying the vessel data file.

-Be careful when playing with top speed properties - this can cause unexpected results (neutral ships that can reach warp will fly right past enemies and circle indefinitely).
I found if you need to use high speeds have the ship fly to s preset point and come to a stop, reduce the max speed and then have them engage enemies.

-I was never able to get Monsters to move. I have faked this by removing them rom point x and creating them at point y several times. I believe you may also be able to Add Property X +/-1 to do this but I have not confirmed this.

-To block comms orders to Neutral ships I used this;
<set_object_property property="willAcceptCommsOrders" value="0" name="DS1Defender1" />
This property is NOT represented in the Mission Editor and must be added manually.

-You can move the player on the Y axis but this must be scripted. The ship will also gravitate towards Y=0 so if you want them to hold at any other altitude you have to have a repeating Event to do so.

-The player ships different functions can be disabled by damaging them with the SystemDamage property but this seems to vary from ship to ship. Trial and error is the only means of disabling a function (say torpedoes) on a given ship. Note that what gives the Light Cruiser no torpedoes will give the heavier ships limited torpedoes.
I have found no way to set Torpedoes to say 25% regardless of the ship the player chooses.
page   1
2 replies
xavierwise.tsn said Jul 26, 2013 13:57:55
I have had a play with the top_speed property a couple of times. I wanted an allied vessel to follow the player ship when it was moving at warp 1. To simulate it, I used the "distance between player and allied vessel" condition. If the distance was less than 800, then the top_Speed was reduced back to normal. If it was greater than 800, then the top_Speed was set to an value equivalent to warp 1 (I cannot call the actual value, but it was something like 2.385).
Mike_Substelny said Jul 30, 2013 15:13:54
I think you can move a monster using addto_object_property for its X and Z coordinates, but that may not be the best way.

But a better way is to create an invisible generic object and tell it to go where you want the monster to go. Then constantly use set_relative_position to pin the monster to the generic object. Once the monster is engaged in combat destroy the generic object and stop pinning the monster to it.
"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: