influogames's Forum Posts

  • Text extracted from Construct manual

    scirra.com/manual/109/audio

    Mobile limitations

    Safari on iOS and Chrome for Android share a limitation in playing music. While sound effects can be played at any time, music is only allowed to start playing when the user touches the screen. This is a limitation in the browsers themselves. As a result, if you play music on the start of layout, you may find in these browsers it does not actually start until the next touch.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But that's not the intended behaviour? To check all the paintings and if their hangingProcess is >= 100?

    If you want to check just for the painting that was clicked on, there's no need for the foreach loop.

    I would do something like this:

  • For example, you could create a function calling your foreach loop. Then call that function in Mouse click event.

    Something like this:

    Mouse On Left button Clicked on Sprite_painting: Call "Your Function"
    	...
    On "Your Function"
    	System For each Sprite_painting: ...
    
  • Oh... okay, there's the problem. The foreach loop is executing every tick because it is not inside in any triggered event. Although is nested in a group it doesn't mean it will execute your code once. I think the best place to put your code is inside the Mouse click event. It would mean that you'll have to refactor your code a little bit.

  • Could we see the events above that foreach? Is it nested in another event/condition?

  • Just to further explain what were happening with your code...

    You were telling the program to check for each instance of Sprite_painting if the hangingProgress was higher or equal to 100, and if that condition was met it was executing the Trigger once for that particular instance. Then, when you executes the code a second time the program checks all instances again, BUT this time, because Trigger once was already called the program ignores it and you get an "infinite loop".

  • Hey man! Instead of adding the trigger once event, add the Stop loop action from System, right after your "Audio Stop..."

    Then you can move all your actions inside the Trigger Once event after the Stop loop.

  • *Note: Your sprites names will have to be renamed as well to match the elements from XML.

  • Oh, ok, there was a problem with naming rules.

    Text from the link:

    Element names must start with a letter or underscore

    So, your XML should be:

    <?xml version="1.0" encoding="UTF-8"?>
    <Niveau>
    	<A1>open</A1>
    	<B1>open</B1>
    	<C1>close</C1>
    	<D1>open</D1>
    
    	<A2>open</A2>
    	<B2>open</B2>
    	<C2>close</C2>
    	<D2>close</D2>
    	<E2>close</E2>
    </Niveau>
    

    Also, put this in a proper XML file (.xml extension), not in a .txt file.

  • Ok, Meu jogo tem apenas uma fase onde ocorrerá todos os eventos do jogo. Assim que o jogador atingir certa pontuação (exemplo: atingir 1.000 pontos), ele ira subir de nível (exemplo: nível atual "1", após atingir 1.000 pontos. Nível 2).

    This is a VERY simplified version of what you want, just comparing the variables and incrementing the level. You still need an event which adds points but we don't know what your game is.

  • Sorry guys! I've read about the forum rules but just forgot about that point... I'll translate my previous posts.

  • It's a little vague about exactly what you want. I don't know if you need help with the variables and the level-up condition event or if you need help after all of that.

    Ficou um pouco vago sobre o que você quer exatamente. Não sei se você precisa de ajuda com as variáveis e o evento com a condição do nível aumentando ou se você precisa de ajuda após isso.

  • You do not have permission to view this post

  • Oh, okay, you can use XML.StringValue("/Niveau/" & Sprite.ObjectTypeName & "/text()")

    The "Sprite" there is your Sprite Object, just replace it with yours.

  • Even if it use ajax. The game can be play offline?

    Yes, but only if you are using the Request a project file action.