Object deletion problem and randoms within limits?

Get help using Construct 2

Post » Sun Jan 29, 2012 6:08 am

Sorry, the subject line only has so much room.

Object deletion:
I have my game set up so when two objects collide with another certain type of object, they'll both be destroyed simultaneously. But when I have more than one instance of each object on the screen, all of them are deleted. Is there any way to change that?

I'd like to be able to set some bullet speeds at random numbers between 40 and 60. Is it possible to do that? All I've seen are randoms from 0 to a certain number.

Thanks guys, appreciate it.(:
Posts: 4
Reputation: 283

Post » Sun Jan 29, 2012 7:12 am

Random(40,61), just try it, the expression will return a number between 40 and 60. (a float actually ie: 40.001, 52.004548040, etc...)
(to round use a cast expression like int(random(40,61)) )
More info in the manual

Also for your question about deletion check the How do I FAQ at the section "Picking/selecting instance(s)" (Understand how to use instance variables to pick specific objects and Even more about picking with UID and IID)Kyatric2012-01-29 07:14:48
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Posts: 7,385
Reputation: 73,846

Post » Mon Jan 30, 2012 2:39 pm

Thanks, appreciate the help.(:
Posts: 4
Reputation: 283

Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 50 guests