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
2
S
2
G
4
Posts: 239
Reputation: 1,928

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
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

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
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

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 Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

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
359
S
214
G
72
Posts: 22,952
Reputation: 178,610

Post » Sat Jan 17, 2009 6:45 am

Ok thanks for the consideration though
B
2
S
2
G
4
Posts: 239
Reputation: 1,928

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 Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests