Spawn Object only over Sprite

Get help using Construct 2

Post » Mon Oct 08, 2012 5:46 pm

Howdy again all!

I'm looking for another solution for an issue I am trying to work out.
What I want to do is spawn a sprite over another sprite at random. Currently I have created Image points to use as a marker for where things can spawn. Using Image Points 1 thru 5 on one sprite I use Choose(1,2,3,4,5) to spawn one at random on one of the five points. While this works great, I'd like to spawn another sprite over ANY X,Y point of the first sprite without having to create lots of Image Points.

Is there a way to spawn an object over any x/y coordinate of a sprite? I'd like it to spawn anywhere on the base sprite inside of it's collision mask. Any ideas?

It seems that I cannot post a direct link as I don't have enough points.
https://dl.dropbox.com/u/11063814/SpawnOverSprite.capx
B
6
S
1
Posts: 37
Reputation: 774

Post » Mon Oct 08, 2012 7:12 pm

try this
B
12
S
2
G
2
Posts: 96
Reputation: 1,583

Post » Mon Oct 08, 2012 7:19 pm

This is exactly what I needed. Thanks! Man do I need to brush up on my math stuff. Wonderful solution.
B
6
S
1
Posts: 37
Reputation: 774


Return to How do I....?

Who is online

Users browsing this forum: Magistross, Yahoo [Bot], zatyka and 20 guests