0 Favourites

detect frame range

  • ok guyz i have made an asteroid that have 35 x 4 frames so 35 frace for 1 type of rock

    how can i make this possible to detect

    i want to detect the fram from 0 to 35 for exemple and this would be 1 rock

  • Generally you would split these up into 4 animations and pick the animation for the rock you want.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • ok that worked perfectly ty

    + System: Trigger once

    + System: For each AsteroidBelt1

    + System: Repeat AsteroidBelt1.?spawnNo times

    -> AsteroidBelt1: Spawn Asteroid_spawner on layer "Game" (image point 0)

    -> Asteroid_spawner: Set eAngle to AsteroidBelt1.?No

    -> Asteroid_spawner: Set animation frame to Self.?no

    -> Asteroid_spawner: Set eOriginX to AsteroidBelt1.?eOriginX

    -> Asteroid_spawner: Set eOriginY to AsteroidBelt1.?eOriginY

    -> Asteroid_spawner: Set speed to AsteroidBelt1.?speed

    -> Asteroid_spawner: Set eAngle to random(?AsteroidBelt1.?angleMin,?AsteroidBelt1.?angleMax)

    -> Asteroid_spawner: Set eSAngleOffset to sin(?AsteroidBelt1.?eAngleOffset)

    -> Asteroid_spawner: Set eBandwidth to random(?AsteroidBelt1.?bandWidth)

    -> Asteroid_spawner: Set eCAngleOffset to cos(?AsteroidBelt1.?eAngleOffset)

    -> Asteroid_spawner: Set eWidth to AsteroidBelt1.?eWidth+?Self.?ebandWidth

    -> Asteroid_spawner: Set eHeight to AsteroidBelt1.?eHeight+?Self.?ebandWidth

    -> Asteroid_spawner: Set eX to cos(?Self.?eAngle)?×?Self.?eWidth

    -> Asteroid_spawner: Set eY to sin(?Self.?eAngle)?×?Self.?eHeight

    -> Asteroid_spawner: Set position to (Self.?eX×?Self.?eCAngleOffset-?Self.?eY×?Self.?eSAngleOffset+?Self.?eOriginX, Self.?eY×?Self.?eCAngleOffset+?Self.?eX×?Self.?eSAngleOffset+?Self.?eOriginY)

    -> Asteroid_spawner: Set width to random(?AsteroidBelt1.?sizeMin,?AsteroidBelt1.?sizeMax)

    -> Asteroid_spawner: Set height to Self.?Width

    -> Asteroid_spawner: Spawn Asteroid on layer "Game" (image point 0)

    -> Asteroid: Set animation to choose(?"Veldspare"?,?"Scordite"?,?"Pyroxeres"?,?"Kernite"?) (play from beginning)

    -> Asteroid: Set animation frame to random(?0?,?35?)

    -> Asteroid_spawner: Destroy

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)