Look into MTE's code for how to make hazards spawn, and also in CE's code for advanced stuff like custom hazards (which i have got no clue on how to do, lol)
Still, we're here if you have any doubts!
EDIT: actually, i guess i could have just pasted the hazard spawner's code here.
Code: Select all
<event name="MTE_HAZARD_PICKER">
<text>What environmental hazard do you want to spawn?</text>
<choice>
<text>An asteroid field.</text>
<event>
<text>Hazard spawned successfully.</text>
<environment type="asteroid"/>
</event>
</choice>
<choice>
<text>A nebula.</text>
<event>
<text>Hazard spawned successfully.</text>
<environment type="nebula"/>
</event>
</choice>
<choice>
<text>A plasma storm.</text>
<event>
<text>Hazard spawned successfully.</text>
<environment type="storm"/>
</event>
</choice>
<choice>
<text>A sun.</text>
<event>
<text>Hazard spawned successfully.</text>
<environment type="sun"/>
</event>
</choice>
<choice>
<text>A pulsar.</text>
<event>
<text>Hazard spawned successfully.</text>
<environment type="pulsar"/>
</event>
</choice>
<choice>
<text>An enemy anti ship battery.</text>
<event>
<text>Hazard spawned successfully.</text>
<environment type="PDS" target="player"/>
</event>
</choice>
<choice>
<text>An allied anti ship battery.</text>
<event>
<text>Hazard spawned successfully.</text>
<environment type="PDS" target="enemy"/>
</event>
</choice>
<choice>
<text>An indiscriminate anti ship battery.</text>
<event>
<text>Hazard spawned successfully.</text>
<environment type="PDS" target="all"/>
</event>
</choice>
</event>
These should be all the vanilla AE hazards. Event editing might be tricky at first, but it's easier than it looks!
As a general rule, you can't have an <event> inside another <event>, but you can have an <event> inside a <choice>, and a <choice> inside an <event>. So you can (and must..!) alternate events and choices like this:
Code: Select all
<event>
<choice>
<event>
<choice>
<event/>
</choice>
<choice> <!-- you can put multiple choices inside a single event -->
<event/>
</choice>
<choice>
<event/>
</choice>
</event>
</choice>
</event>
Oh, also i guess every event and choice must have a <text> inside it. >_> isn't there a tutorial on event editing somewhere?