Galaxia, PHP

Scripting in Galaxia Reborn

<![CDATA[Introduction to XGS

This won’t sound that impressive since noone has seen any of GR working but I have scripting working at a minimal level in Galaxia Reborn.

I gave a ship the following script:


<xgs>
<script event="entersector">
<savetomemory name="w" value="($w+1)%4" />
<setcourse target="$waypoints.$w" />
</script>
</xgs>

$waypoints is simply an array of four coordinates. The function savetomemory just saves data to the ship which is read back in when the script next executes.

oop, programming, scripting]]>

Leave a comment