Copy a specific object type from within a family

Get help using Construct 2

Post » Tue Sep 11, 2012 10:32 am

Sorry if this has been covered, but I wasn't able to find anything.

Let's say I want to make copies of sprites on click. With a single sprite, we'd see something like this:

On click Monster -> Monster spawn Monster

Now, let's say I want to do that with a whole lot of different types of monsters. We have our family (BadGuys) and our sprites within that family (Bad1, Bad2, etc.). I want to make an event to the tune of:

On click BadGuy -> Spawn BadGuy

but the way Construct handles this, it is spawning a random sprite from the BadGuy family. I was thinking of trying to use instance variables, something like:

On click BadGuy
->Set BadGuy.clicked to true
->Create BadGuy of same type as BadGuy with clicked=true

or even:

->Set BadGuy.type to "Bad1"
->Spawn BadGuy.type

but I can't find any way to do this. Help?
Posts: 62
Reputation: 2,367

Return to How do I....?

Who is online

Users browsing this forum: blackhornet, evillair, NumberOne, Solomon and 5 guests