LittleStain's Forum Posts

  • I just added a randomness to it and made sure the spike wasn't created on the first 100 and last 100 pixels of the bgtile, because that was what you asked..

    Oh, and you should probably pin the spikes to the platform with the pin behaviour for them to move with the platform..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Everything is possible, but I'm not quite sure what you want to do..

    on platform created you should check the width of the platform

    if the platform is more than 200 in width create a random function to put or not put spikes on it..

    so something like this:

    on platform created

    system compare two values: platform.width > 200

    • call function "Spikes" with parameter 0=choose(0,1) ,parameter 1=platform.x ,parameter 2=platform.width , parameter 3=platform.y

    on function "Spikes"

    compare function parameter function.param(0) = 1

    • create object spikes at x=random(function.param(1)+100,function.param(1)+function.param(2)-100) y=function.param(3)
  • You do not have permission to view this post

  • There are many plugins for this if Ajax, webstorage and savegames are not what you want..

  • Easy way would be something like this:

    Create global variable CameraOldX

    System every tick

    System compare two values: Sprite.x>CameraOldx

    • system scrollto x=sprite.x, y=sprite.y

    -System set value CameraOldX: sprite.x

  • You'd have to work with touchindex and set the actions for the object touched based on the touchindex of the touch touching it..

    Alternatively you could use instance variables (or Booleans) and set them on touched and check those variables before having the actions performed..

  • So simply put C2 calculates the angle between the bullet position and the object position and you add 180 (degrees) to get the opposite angle..

  • would this work?

    set angle to: angle(bullet.x,bullet.y,object.x,object.y)+180

  • From the manual:

    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.

  • Tried the tutorial section?

    https://www.scirra.com/tutorials/311/level-select

  • on touch create a sprite

    if sprite.x > player.x - player simulate platform pressing right

  • You are probably looking for the simulate control action..

    If you add the platform behaviour these should be in your possible actions

    so on >> pushed - playerbox simulate control right..

    or something like that..

  • There is the disable collisions action?

  • I would try using lerp (linear interpolation) for this

    something like:

    every tick player set position x=lerp(player.x,mouse.x,0.5) y=lerp(player.y,mouse.y,0.5)

    the issue with the walls could come from the bullet missing the collisions due to speed