Instance Variables

Get help using Construct 2

Post » Sat Aug 17, 2013 9:02 am


Hi there.

I'm still not quite understanding instance variables.

In this situation (Sorry for dodgey capture):




Can I somehow use instance variables to make the moths beat their wings at different speeds?

Thank you.

B
13
S
1
Posts: 68
Reputation: 1,198

Post » Sat Aug 17, 2013 9:32 am

Add an instance variable to the moth named "ASpeed". Then in the event sheet:

On start of layout
      > Moth > Set Value > "ASpeed" to > random (1,10).
      > Moth > Set Animation Speed to > Moth.ASpeed


B
10
S
4
Posts: 133
Reputation: 1,543

Post » Sat Aug 17, 2013 9:54 am

That worked!
Thank you!
B
13
S
1
Posts: 68
Reputation: 1,198

Post » Sat Aug 17, 2013 10:56 am

I don't think the video showed actually does anything. It's loop length is only about 3 seconds for me (and I tried clicking your play button-- for future uses, seeing as you have your answer.)
B
20
S
7
G
4
Posts: 322
Reputation: 4,521

Post » Sat Aug 17, 2013 3:57 pm

Yeah, sorry about that.
I find C2 crashes when I try to ctrl alt print screen. So I use video capture software when I want a screenshot. but I accidentally exported it as animated gif, instead of .png, and didn't notice it until I'd already uploaded the image to my blog.
B
13
S
1
Posts: 68
Reputation: 1,198

Post » Thu Aug 22, 2013 12:26 am

[QUOTE=Hansokumake] Yeah, sorry about that.
I find C2 crashes when I try to ctrl alt print screen. So I use video capture software when I want a screenshot. but I accidentally exported it as animated gif, instead of .png, and didn't notice it until I'd already uploaded the image to my blog. [/QUOTE]

I usually just press Prt Scr (print screen) then paste into MS Paint and save JPG for screenshot.
B
33
S
7
G
8
Posts: 312
Reputation: 8,528

Post » Thu Aug 22, 2013 2:35 pm

He hey!

B
13
S
1
Posts: 68
Reputation: 1,198


Return to How do I....?

Who is online

Users browsing this forum: Badmiracle, dop2000 and 20 guests