Rules are being ignored when published in HTML5?!

So when using the preview function in my game, it works fine. The enemy characters have been set "Waypoints". So when Enemy collides with Player of Type: Left he will move left. For some reason when I publish to HTML5, SOME enemies to this, and move their usual route, and some just, don't. They just stand still and the rules don't seem to be working for these specific actors. Has anyone experienced this before?

Comments

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @callumhurley@remasteredmedia.co.uk‌ , check that you don't have rules that are switched "off" in your game. Games published as HTML5 ignore this flag and will interfere with other rules.

  • ReMasteredGamesReMasteredGames Member Posts: 101

    @Hopscotch said:
    callumhurley@remasteredmedia.co.uk‌ , check that you don't have rules that are switched "off" in your game. Games published as HTML5 ignore this flag and will interfere with other rules.
    @Hopscotch said:
    callumhurley@remasteredmedia.co.uk‌ , check that you don't have rules that are switched "off" in your game. Games published as HTML5 ignore this flag and will interfere with other rules.

    Just checked, I don't have any rules switched off:/ I can't think what could be interfering with it, since it's not EVERY actor that dismisses these rules.

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @callumhurley@remasteredmedia.co.uk‌ , when you say that the problem occurs with waypoints, can it be that you are too specific with your rule?

    Meaning, something like ...

    Rule: if self.Position.X = 20
    then move right

    is better changed to

    Rule: if self.Position.X <= 20
    then move right

  • ReMasteredGamesReMasteredGames Member Posts: 101

    @Hopscotch said:
    callumhurley@remasteredmedia.co.uk‌ , when you say that the problem occurs with waypoints, can it be that you are too specific with your rule?

    Meaning, something like ...

    Rule: if self.Position.X = 20
    then move right

    is better changed to

    Rule: if self.Position.X <= 20
    then move right

    That's not the way I've done this. I've created physical actors that represent the four movements.

    Rule: if (Enemy Actor) collides with Player of Type: Right
    Move Right

    That's why I'm unsure as to why it works with some and not others.

  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited May 2014

    @callumhurley@remasteredmedia.co.uk‌ ,

    Is it always the same actors misbehaving? Do they move by interpolation or constrains? Just some possible problem areas.

    Otherwise maybe post a screenshot of those rules.

  • ReMasteredGamesReMasteredGames Member Posts: 101

    The rule makes the actor move horizontally at 75 and makes sure it can't move vertically by setting it to 0

  • ReMasteredGamesReMasteredGames Member Posts: 101

    imageImage and video hosting by TinyPic" alt="" title="" />

  • HopscotchHopscotch Member, PRO Posts: 2,782

    Hmm, @callumhurley@remasteredmedia.co.uk‌, that bit looks ok. And you are saying that in preview it all works?

    If the problem only occurs in HTML5 then I would still maintain that there is somewhere a rule (off) which is interfering, maybe hidden in an else section.

    If not you may have found a bug. You could PM me your file to have a look if you like. Take out sensitive images beforehand if needed.

  • ReMasteredGamesReMasteredGames Member Posts: 101

    @Hopscotch said:
    Hmm, callumhurley@remasteredmedia.co.uk‌, that bit looks ok. And you are saying that in preview it all works?

    If the problem only occurs in HTML5 then I would still maintain that there is somewhere a rule (off) which is interfering, maybe hidden in an else section.

    If not you may have found a bug. You could PM me your file to have a look if you like. Take out sensitive images beforehand if needed.

    I've tried looking all around the game and can't seem to find an off rule. Yeah it works perfectly in the preview, but not in the HMTL5 published version. Sure I'll PM you the file, thanks.

  • HopscotchHopscotch Member, PRO Posts: 2,782

    We found the solution here.

    There is a slight difference between preview and HTML5, in the way rules fire on first scene launch.
    Rules which are true on the first cycle get fired in preview but not in HTML5.

Sign In or Register to comment.