LittleStain's Forum Posts

  • Should be relatively easy..

    You could for example use global variables, a dictionary object or an array (set to global)..

    All you'd have to do in the other layout is check this in a condition and add actions accordingly..

  • I'm still a bit of a C2 noob. I assumed that if I didn't, it would just keep resetting the shake animation for as long as the player stood on the block. I've tried it without the Trigger Once, but it doesn't help. Tried just making the block explode on collision, but that doesn't work either. It;s a head scratcher.

    If it doesn't detect a collision, the "on collision" doesn't trigger..

    Overlapping at offset y=1 or 2 should do the trick..

    It could be your collision polygon has just 1point at the bottom, or has other issues that prevent the collision/overlap detection..

  • I'm not sure why you'd have a trigger once (sub)event on a triggered event..

    in this case I'd probably use an "is overlapping at offset" event instead of a collision event..

  • You mean like in the lighting example shipped with Construct2?

    new project - searchbox - lighting

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It happens..

    Glad I could help..

  • depending on how you have your movement and controls for the movement set up, a simple wait action between setting the movement of the orginal character and the clone could be enough

  • You do know contact is spelled wrong in event 2?

  • Could you show an example on how your events are set up?

    Might be a very simple thing, (especially since you are saying ajax.lastdata exists)..

  • It doesn't work...

    Please explain further...

    Should work if done correctly..

    All events that have an action attached setting animation in your capx are conflicting with your death-animation..

    All these events need an extra condition EnHP > 0..

    You could also make them all subevents of an event EnHP > 0..

    The death animation itself only needs to be triggered once when the HP < or equal to 0, that's why I put it as a subevent of the event subtracting from the HP, because that's the only trigger it needs..

  • Not sure about this, but would starting the music for the next layout on the previous one work?

  • Simulating a physical touch through programming, sounds to me like a hackers dream, so I hope it's not possible..

    Why a first touch is needed?

    From the manual on 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.

    Safari on iOS has a further limitation that no audio can play at all until the first touch. In other words, audio starts off muted and the first touch unmutes audio playback.

    Usually you do not need to handle this in your events. If you try to play sound or music on 'start of layout', the audio object will automatically queue it up for playback the next time the user touches the screen. However you should be aware of this when designing your game. If the first touch changes layout or stops the music, then the music may never be heard. You may want to start playback then encourage the user to touch the screen with a 'Play' icon or something similar.

    So it's the browser that has the limitation..

  • Somthing like this?

    Far from perfect