Spawn object and rotate it variously?

Get help using Construct 2

Post » Sun Jul 30, 2017 7:58 am

Hey
OK, I spawned blood. But how to spawn it and rotate once? You know.. now all blood looks same.
B
7
S
3
G
2
Posts: 114
Reputation: 2,037

Post » Sun Jul 30, 2017 8:34 am

After spawning, in the same spawn event set angle to random(360).

If you want to add even more variety set the scale to random (1,2)*0.5
B
16
S
7
G
3
Posts: 396
Reputation: 3,700

Post » Sun Jul 30, 2017 8:39 am

And for even more variety, add a few different frames (remember to set the animation speed to 0) and add a "set frame to floor(random(sprite.animationFrameCount)" action.
B
16
S
7
G
3
Posts: 396
Reputation: 3,700

Post » Sun Jul 30, 2017 8:56 am

mekonbekon wrote:And for even more variety, add a few different frames (remember to set the animation speed to 0) and add a "set frame to floor(random(sprite.animationFrameCount)" action.

@mekonbekon Like this?
Image
B
7
S
3
G
2
Posts: 114
Reputation: 2,037

Post » Sun Jul 30, 2017 9:40 am

It's better to put the Set angle action after the Spawn LancBlood.
B
16
S
7
G
3
Posts: 396
Reputation: 3,700

Post » Sun Jul 30, 2017 9:56 am

@mekonbekon
mekonbekon wrote:It's better to put the Set angle action after the Spawn LancBlood.

thanks, but it's possible to add another one - set opacity? But what then, rendom(100) ?
B
7
S
3
G
2
Posts: 114
Reputation: 2,037

Post » Sun Jul 30, 2017 10:43 am

@marcinkowski

Here's an example that combines all the options mentioned above. I've also added in a particle effect for extra variation:

https://www.dropbox.com/s/xac90mlf31rz7 ... .capx?dl=0
B
16
S
7
G
3
Posts: 396
Reputation: 3,700

Post » Sun Jul 30, 2017 10:51 am

mekonbekon wrote:@marcinkowski

@mekonbekon Here's an example that combines all the options mentioned above. I've also added in a particle effect for extra variation:

https://www.dropbox.com/s/xac90mlf31rz7 ... .capx?dl=0


that's greate! thanks much man!
B
7
S
3
G
2
Posts: 114
Reputation: 2,037

Post » Sun Jul 30, 2017 11:00 am

You're welcome :)
B
16
S
7
G
3
Posts: 396
Reputation: 3,700


Return to How do I....?

Who is online

Users browsing this forum: ezgaming420, Yahoo [Bot] and 8 guests