WhatPumpkin/Sburb

Triggers

Closed this issue · 9 comments

Hi,

I'm following the wiki instructions but it seems that no matter what I do I can't get any triggers to fire. Here is my trigger, which I put right after the <room> tag in firstRoom.xml. My character can definitely walk from x=0 to (at least) x=900. What am I doing wrong?

<trigger detonate='true'>spriteProperty,char,x>800
    <action command='talk'>
        <args>@! There's nothing over here!</args>
    </action>
</trigger> 

Any help would be appreciated. I love this project!
gav

Did you make sure to wrap it in the triggers tag?

<rooms>
 <room>
  <triggers>
   <trigger>blasdasdkass</trigger>
  </triggers>
 </room>
</rooms>

aha! That makes sense, but I didn't see it mentioned in the wiki. I'll give it a shot tonight, but I'm pretty sure that will work.

Thanks!

If you find anything wrong in the wiki, feel free to fix it or post another issue.

Just checked, and yeah it was pretty vague. Changed it a bit to be more clear. A lot of the docs on triggers are likely pretty out of date now (for instance I doubt there's any mention of the new "operator" attribute and how you can have multiple "args" tags to have logical comparisons (like x>3 OR y<2).

Also, in theory x>800 is a deprecated expression. You should avoid < and > because they have a meaning in XML. Instead I suggest using GREATER and LESS (x GREATER 800, y LESS 200 ...). We didn't in openbound just because it was broken for a while and no one bothered to deal with it until really late on. (you can safely use

&gt; and &lt;

in place of > and < respectively, if you don't like GREATER and LESS)

awesome, thanks!

triggers also don't work on fighters, but that is fixed in my "improved strife mode" build

edit: disregard, of course they do.

wow, I didn't even know there was strife! It's not mentioned in the wiki. It sounds awesome. How can I do it?

it's very basic, just set mode="strife" in the main tag, and use a tag to define your player, as seen here .
All you have right now is the ability to click on sprites instead of pressing space near them, and fighters move with momentum and can have attack animations.

I'm slowly getting strife mode to work as it did in [s] act 4, minus the inventory system.

I think we're done here.