All done and released already?

Moderators: Scripting / Modding Moderators, Moderators for English X Forum
Code: Select all
$data.array[0] = [THIS]->get size of object
$data.array[1] = [THIS]->get sector
$data.array[2] = [THIS]->get attacker
$data.array[3] = [THIS]->get position as array
$data.array[4] = [THIS]->get owner race
= null->call script 'ej.capship.boom' : data.array=$data.array
This code can't be used in the called script:
skip if $Ship != [THIS]
continue
Instead, have it check for the local variable:
skip if not $ship->get local variable: name='ej.military.bigship.blast'
continue
This code can't be used in the called script:
$Range = get distance between [THIS] and $Ship
Instead, use this:
$origin.pos = $data.array[3]
$range = $ship -> get distance to: position array=$origin.pos
This code can't be used in the called script:
$Ship->destroy object: killer=[THIS], show no explosion=[FALSE]
Instead, use this:
$origin.race = $data.array[4]
$Ship->destroy object: killer=$origin.race, show no explosion=[FALSE]
Interesting problems. But what do you mean when you say "don't use sig.killed to start a task"? Do you mean starting a task on the killed object?To sum it up:
don't use sig.killed to start a task
any script called by the sig.killed object needs to end as fast as possible
use sig.killed to gather data about the object
Code: Select all
$secondcall = [THIS]-> get local variable: name=kill.sig.secondcall
skip if not $secondcall
return null
[THIS]->set local variable: name=kill.sig.secondcall value=[TRUE]
Not sure about that code... if it doesn't relate to another object for it to be the enemy of, presumably it means Enemy Race or similar?<RetVar/IF> <RefObj> -> is <Var/Ship/Station> a enemy
Is that a shortcut which detects if <Var/Ship/Station> is in a core sector and then determines if it is Foe based on its notoriety?
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="Example" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<documentation>
<author name="JDouglas" alias="EmperorJon" contact="Forum" />
</documentation>
<cues>
<cue name="cue_test">
<check_all>
<check_value value="{player.name}"/>
</check_all>
<action>
<incoming_message popup="1" text="{player.name}"/>
</action>
</cue>
</cues>
</director>
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet href="director.xsl" type="text/xsl" ?>
<director name="Example" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="director.xsd">
<documentation>
<author name="JDouglas" alias="EmperorJon" contact="Forum" />
</documentation>
<cues>
<params>
<param name="MilitaryRace" value="EJKILLSHIP Military.Race"/>
<param name="EnemyRace" value="EJKILLSHIP Enemy.Race"/>
<param name="SetDifficulty" value="EJKILLSHIP Difficulty"/>
<param name="Target" value="EJKILLSHIP Target"/>
<param name="TargetSector" value="EJKILLSHIP Target.Sector"/>
<param name="MissionVersion" value="EJKILLSHIP Mission.Version"/>
<param name="OutpostSentThrough" value="EJKILLSHIP Outpost"/>
</params>
<cue name="dockedatmo">
<condition>
<object_is_docked dockobject="{Outpost}">
</condition>
<run_script script="ej.military.player.mission.setup" object="{player.ship}">
</cue>
</cues>
</director>
Code: Select all
<cues>
<cue name="ShipTrig">
<timing>
<time exact="60s"/>
</timing>
<action>
<do_all>
<incoming_message text="Started!"/>
<find_ship name="this.triggership">
<position x="1000km" y="1000km" z="1000km" exact="0"/>
<sector x="0" y="0"/>
</find_ship>
<do_if value="{object.exists@this.triggership}" exact="0">
<cancel_cue cue="ShipTrig"/>
<reset_cue cue="ShipTrig"/>
<incoming_message text="Noship!"/>
</do_if>
<do_if value="{object.exists@this.triggership}" exact="1">
<set_owner race="player" object="{this.triggership}" />
<incoming_message text="Ship transferred"/>
</do_if>
</do_all>
</action>
</cue>