[Mod Help] Making an event. But will not work.

Discuss and distribute tools and methods for modding. Moderator - Grognak
Justin
Site Admin
Posts: 265
Joined: Thu Apr 19, 2012 9:52 am

Re: [Mod Help] Making an event. But will not work.

Postby Justin » Sun Sep 30, 2012 3:22 pm

For other people to see it -

Code: Select all

<eventList name="TSCRAP">
   <event load="TRAPPED_METALCRATE_1"/>
<event name="TRAPPED_METALCRATE_1"/>
   <text>You come across a medium sized metal crate, drifting in space. It looks to be air tight. What do you do?</text>
   <choice hidden="true">Take it.
      <text>The moment you place the crate inside your ship. The top bursts upwards as two mantis bandits jump out and yell out.</text>
      <event load="TRAPPED_METALCRATE_2"/>
   </choice>
   <choice hidden="true">
      <text>Leave it.</text>
   </choice>
   
   <event name="TRAPPED_METALCRATE_2"/>
      <text>THIS SHIP IS OURS MEATBAG~!</text>
      <boarders min="2" max="2" class="mantis"/>
   </event>
</eventList>


It's kinda a mess. Even having an extra "/" at the end of <event name="TRAPPED_METALCRATE_1"/> means it won't work correctly. Plus every <choice> needs an <event> inside; even if it's just a dummy empty event.

I'm not sure what you're trying to do. You load events a lot more than you need to. If you're trying to make a crate that has multiple things happen when you open it, you could do something like this:


Code: Select all

<event name="TRAPPED_METALCRATE_1">
  <text>You come across a medium sized metal crate, drifting in space. It looks to be air tight. What do you do?</text>
  <choice hidden="true">
      <text>Take it.</text>
      <event load="TRAPPED_METALCRATE_2"/>
  </choice>
  <choice hidden="true">
      <text>Leave it.</text>
      <event/>
  </choice>
</event>
<eventList name="TRAPPED_METALCRATE_2">
   <event>
           --whatever you want to happen 50% of the time ---
   </event>
   <event>
            --The other thing that can happen 50% of the time ---
   </event>
</eventList>
   
If you're having hull problems, I feel bad for you son. I've got 99 problems but a breach ain't one.
Justin
Site Admin
Posts: 265
Joined: Thu Apr 19, 2012 9:52 am

Re: [Mod Help] Making an event. But will not work.

Postby Justin » Sun Sep 30, 2012 3:41 pm

NP. Good luck.

Also it's easier for people to help you if you post the code in question.
If you're having hull problems, I feel bad for you son. I've got 99 problems but a breach ain't one.
IMP1
Posts: 2
Joined: Mon Oct 01, 2012 10:19 am

Re: [Mod Help] Making an event. But will not work.

Postby IMP1 » Mon Oct 01, 2012 10:22 am

Justin wrote:Plus every <choice> needs an <event> inside; even if it's just a dummy empty event.


Does it work with a dummy <event /> in each choice?
Icehawk78
Posts: 230
Joined: Tue Sep 18, 2012 4:55 pm

Re: [Mod Help] Making an event. But will not work.

Postby Icehawk78 » Mon Oct 01, 2012 7:45 pm

PvtVain wrote:I'll try that.

EDIT: Wow, I am not sure how that works, but it is working correctly now. Thank you.

As Justin said before, each <choice> node must have an <event> node inside it. If you don't want the event to do anything, it can simply be a single <event />, but their internal engine seems to require every choice to have an attached event.

Who is online

Users browsing this forum: Jumbocarrot0 and 6 guests