Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Since CC Wiki is gone and I'm dumb as hell I don't know how to use "OR" system condition. I wanna Audiere play sound "walk1" OR "walk2" OR "walk3" (33,3% chance) when character walk (actually he don't walk now, I use "every X milliseconds", but is not important), because having only one sound for walk may be quite... boring. I don't wanna use variables for such simple thing, but I really don't know how to use "OR" condition. Can you help me?
Something like this? Not using OR
audio:play sound(choose("sound1", "sound2", "sound3"))
I don't think that Construct Classic understand "choose"...
oh damn.. sorry dude
note to self, look at forum title
In CC can you do:
choose random number 1 to 3
if number=1 -> play "walk1"
if number=2 -> play "walk2"
if number=3 -> play "walk3"
Develop games in your browser. Powerful, performant & highly capable.
You could use this expression for an equivalent of choose.
{"sound1", "sound2", "sound3"}at (random(3)+1)
codah, yes, but I really don't wanna create variables for such trivial things.
Thanks R0J0, your solution of course work, too bad that I totally don't understand why this work...
codah, yes, but I really don't wanna create variables for such trivial things. Thanks R0J0, your solution of course work, too bad that I totally don't understand why this work...
I think this creates an one dimensionnal array of the 3 strings, then it choose one of the 3 values (not sure why the +1, does CC needs a 1 based index?)
> codah, yes, but I really don't wanna create variables for such trivial things. > > Thanks R0J0, your solution of course work, too bad that I totally don't understand why this work... > I think this creates an one dimensionnal array of the 3 strings, then it choose one of the 3 values (not sure why the +1, does CC needs a 1 based index?)
> codah, yes, but I really don't wanna create variables for such trivial things.
>
> Thanks R0J0, your solution of course work, too bad that I totally don't understand why this work...
Yes.
sorry CC is out of my depth.. is there a premium on variables or something?
There are only global and instance variables in CC. C2 spoils us with local variables.