dcrew's Recent Forum Activity

  • Of course it does say so. You would have to "or" the comparisons itself. So that you have 4 comparisons in that event that are or'd. With CC you would do

    Block.AnimationName = "block1"

    OR

    Block.AnimationName = "block3"

    OR

    Block.AnimationName = "block13"

    OR

    Block.AnimationName = "block14"

    and every line is one condition (4x Comparison, 3x OR). I guess then it isn't possible to "or" conditions in C2? But in the manual it is described as if possible:

    http://www.scirra.com/manual/78/expressions/page-1

    Maybe there is "evaluate" as a system condition?

    EDIT: In general, remember that any logical operator just compares to boolean values (TRUE or FALSE) and nothing else. Those values may be replaced by expressions/conditions that result to either TRUE or FALSE (like "if a is greater b"), but it needs to be something that results in a boolean value.

    There's no OR or EVALUATE condition as I've just checked, But I guess I'll just wait for Ashley and Tom to release 74 with the fixes OR thing for this: Click Here!

  • It's a logical operator. You can't compare against a collection of logical or'd strings. I don't use C2, so I can't say if this is doable with the event system, but the correct way to get what you want would be:

    Block.AnimationName = "block1" | Block.AnimationName = "block3" | Block.AnimationName = "block13" | Block.AnimationName = "block14"

    This will result to true, if Block.AnimationName equals one of the four strings.

    I tried that one and it says:

    <img src="http://screensnapr.com/e/9VKCCc.png" border="0" />

  • dcrew: You should take a look at the custom OR plugin.

    While this plugin is great, it only seems to handle 2 different conditions, I want block1 OR block3 OR block 14 OR block 15, This won't exactly work for me.

  • Oops, that's a bug - fixed for next build - but see my other thread where the OR operator is not doing what you want it to.

    Omg Yay!! Please tell me this will be released soon, I want to work on my game. I don't mind if I have to wait though.

  • The OR operator doesn't do what you've assumed it to. It's a logical OR which returns either true or false. An empty string counts as false and other strings count as true. So "block1" | "block3" | "block13" | "block14" results in 'true', and you then do the comparison 'Block.AnimationName = true', which it probably isn't, so the event never runs.

    Is there a way around this? Without having to use it with 4 events, There are reasons why and I don't want to go into too much detail until I release the game, I'm sadface :( <img src="smileys/smiley19.gif" border="0" align="middle" />

  • I can't continue my game until this is fixed <img src="smileys/smiley11.gif" border="0" align="middle" /> <img src="smileys/smiley34.gif" border="0" align="middle" /> <img src="smileys/smiley28.gif" border="0" align="middle" /> <img src="smileys/smiley19.gif" border="0" align="middle" />

    The alternate way affects performance badly.

  • <img src="http://screensnapr.com/e/gFuZuR.png" border="0" />

    The | OR operator isn't working, it works fine when I just compare it to "block1" but when I try to compare to "block1" | "block3" it doesn't work!

  • I seem to get the Error when I add this condition:

    <img src="http://screensnapr.com/e/FeR42v.png" border="0" />

  • <img src="http://screensnapr.com/e/2yESyL.png" border="0" />

  • Nevermind I read the expressions page and I think this works:

    <img src="http://screensnapr.com/e/5NETTE.png" border="0" />

    Dumb me :S

  • It's a suggestion, but really does bug me! (Pun Intended)

    I click on my sprite to add an action and click "Which Animation of 'Sprite1' is playing?"

    And then you enter one to dertermine it for example

    "Sprite1:If 'hello' Animation is Playing"

    well it'd be so awesome if I could add multiple parameters to determine so that the event occurs if any of the following are listed, for example:

    "Sprite1:If 'hello' or 'hi' or 'hey' Animation is Playing"

    OR

    "Sprite1:If 'hello', 'hi', 'hey' Animation is Playing" (comma meaning "OR")

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • the link doesn't work.

    I just tested it and it seems to work for me <img src="smileys/smiley5.gif" border="0" align="middle" />

dcrew's avatar

dcrew

Member since 25 Sep, 2011

None one is following dcrew yet!

Trophy Case

  • 13-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

15/44
How to earn trophies