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?

Randoms:
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.(:
B
2
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 !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Mon Jan 30, 2012 2:39 pm

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


Return to How do I....?

Who is online

Users browsing this forum: MrLOL64 and 21 guests