Use random function with variable

Get help using Construct 2

Post » Tue Dec 11, 2012 9:35 pm

As a programming FYI

Reference to C
http://technoburst.blogspot.ca/2011/07/difference-between-const-and-static-in.html

and from Scirra manual
https://www.scirra.com/manual/83/variables

------------
CONSTANT are variable that are initialized ONCE at the beginning. They are supposed to hold unchanging values.

STATIC are variables that persist in a class or function between calls, but allow for the variable content to change.
------------


Since maxCarrots can change he should be setting the it's toggle to static not const. Will this fix your problem? no idea, but it's what you should be doing to your maxCarrots variable as you need it to persist and change.

static = on
const = off
jayderyu2012-12-11 21:40:29
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Wed Dec 12, 2012 9:31 am

Thank you all guys! Great forum crew. Problem solved.
B
4
Posts: 14
Reputation: 510

Previous

Return to How do I....?

Who is online

Users browsing this forum: Braus, jatin1726 and 15 guests