Rules are being ignored when published in HTML5?!
ReMasteredGames
Member Posts: 101
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
@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.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
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.
@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
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
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.
@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.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
The rule makes the actor move horizontally at 75 and makes sure it can't move vertically by setting it to 0
" alt="" title="" />
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.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
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.
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.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com