Choosen one value from range

Get help using Construct 2

Post » Sat Apr 18, 2015 5:34 pm

Hi.

How can i do choise from range of values in C2?

Logic is:
Random number choosen from 1 to 10
Then if it was a number from 1 to 4 - spawn object A, if 5 to 10 - spawn object B.

Here what i do:
Image

But that didn't work well enought
Image

Sometimes it spawn 2 objects in one place, but just in one cell, sometimes it didn't spawn anything at all, but logically should. I think all this problems because of my method of value choosing from range, so, is it possible to do it in another way and how?
B
6
Posts: 11
Reputation: 280

Post » Sat Apr 18, 2015 6:30 pm

On Left button clicked...set WaponChanse to int(random(1,11))

WaponChanse is less than 5......spawn Pencil
else...Rubber

if you insist on logical
and & ; or |

capx>
http://s000.tinyupload.com/index.php?fi ... 2600911017

1=True:0=False
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Apr 18, 2015 6:39 pm

Message: Dizshok is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
korbaach wrote:On Left button clicked...set WaponChanse to int(random(1,11))

WaponChanse is less than 5......spawn Pencil
else...Rubber

if you insist on logical
and & ; or |

capx> 1=True:0=False


Omg, dude, thank you!
B
6
Posts: 11
Reputation: 280


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests