Addition to Family spawns

New releases and general discussions.

Post » Fri Jan 16, 2009 12:01 pm

Im happy enough for the addition of being able to randomly spawn a family object. I have an idea though. Why not be able to make some parts of a family spawn more than others? for example: Objects A, B, and C are in a family.
---Bullet collides with Wall- Spawn Object Family- 50% Object A 30% object B 20%object C.
donno if this would be hard to add or if its even a priority just thought it might be a good Idea.
B
4
S
3
G
5
Posts: 241
Reputation: 2,582

Post » Fri Jan 16, 2009 3:32 pm

you can easily program the random thing with a couple of extra events.
>bullet collides with wall
-set bullet('randomizer') to random(101)
>bullet randomizer between 0-50
-spawn obj 1
-destroy bullet
>bullet randomizer between 51-80
-spawn obj 2
-destroy bullet
>bullet randomizer between 81-100
-spawn obj 3
-destroy bullet
B
48
S
10
G
9
Posts: 1,224
Reputation: 8,449

Post » Fri Jan 16, 2009 4:07 pm

Yes it would work like that. But why are you using Random(101)? That's not accurate.
Use Random(100), make the range for obj1 0-49, obj2 50-79 and obj3 80-99.
B
23
S
6
G
10
Posts: 1,041
Reputation: 7,553

Post » Fri Jan 16, 2009 5:24 pm

Still his idea would be a nice addition, perhaps a slot under families, called random pick probability?....
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806

Post » Fri Jan 16, 2009 6:40 pm

No, I think this is too specific a feature to deserve IDE features. It's fairly obscure, and very easy to do in events, so I think any IDE options to make this quicker and easier is a waste of space.
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,681

Post » Sat Jan 17, 2009 6:45 am

Ok thanks for the consideration though
B
4
S
3
G
5
Posts: 241
Reputation: 2,582

Post » Sat Jan 17, 2009 6:53 am

[quote="Davioware":32rizexk]you can easily program the random thing with a couple of extra events.
>bullet collides with wall
-set bullet('randomizer') to random(101)
>bullet randomizer between 0-50
-spawn obj 1
-destroy bullet
>bullet randomizer between 51-80
-spawn obj 2
-destroy bullet
>bullet randomizer between 81-100
-spawn obj 3
-destroy bullet[/quote:32rizexk]

Yeah well, its easy to do in pseudo code any ways.....
Image ImageImage
B
169
S
50
G
174
Posts: 8,331
Reputation: 110,806


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests