detect frame range

Get help using Construct 3!

Post » Fri Jul 14, 2017 6:13 pm

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
B
28
S
9
G
3
Posts: 136
Reputation: 3,775

Post » Fri Jul 14, 2017 6:16 pm

Generally you would split these up into 4 animations and pick the animation for the rock you want.
ImageImageImage
B
71
S
22
G
240
Posts: 3,734
Reputation: 133,994

Post » Fri Jul 14, 2017 6:54 pm

ok that worked perfectly ty :D

+ 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
B
28
S
9
G
3
Posts: 136
Reputation: 3,775


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 2 guests