How to split a sprite?

Get help using Construct 2

Post » Tue Feb 19, 2013 2:19 pm

Not sure if anybody ever saw the old arcade game Buster Bros. In the game the character shoots up at a balloon and when he hits it, it splits into 2 sprites that are now half the size of the original. I've tried spawning 2 sprites from that position and then destroying the original. It looks messy though. Anybody have an idea?
Thanks
my capx is at


https://www.dropbox.com/s/2u4bx4loo8b7bv1/balloon.capxdinofun2013-02-28 03:20:47
B
14
S
6
G
3
Posts: 71
Reputation: 3,811

Post » Tue Feb 26, 2013 1:16 pm

Well doesn't sound so messy to me
The 2 small balloons should be 2 instances of the same sprite, so they can act independent.
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Tue Feb 26, 2013 1:56 pm

Thanks Pakost
I've worked on it a bit more and have been stuck the last day or so on why the balls don't act like I want them to. They split, but it seems like if I shoot one ball it makes the other one stop. I haven't been able to determine their erratic behavior. Will keep trying though.
B
14
S
6
G
3
Posts: 71
Reputation: 3,811

Post » Tue Feb 26, 2013 2:56 pm

Most likely you adress all the balls
You should make the action like this

If "bullet" overlaps "Balloon"
then destroy balloon and spawn 2 new balloons

if that is one action, then it will take only the balloon that is hit, not the others.

Not sure but hope it answers your issue
cheers

B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Wed Feb 27, 2013 5:40 am

I think that is what I've done but when it spawns it sometimes creates 2 balloons that are moving and 1 that is just frozen. I'll keep working on it. Thanks Pakost!
B
14
S
6
G
3
Posts: 71
Reputation: 3,811

Post » Wed Feb 27, 2013 10:47 am

If you share the capx I'll try to help
Just save it as single file
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Wed Feb 27, 2013 2:33 pm

Thanks Pakost

https://www.dropbox.com/s/2u4bx4loo8b7bv1/balloon.capx
B
14
S
6
G
3
Posts: 71
Reputation: 3,811

Post » Wed Feb 27, 2013 3:35 pm

Here you go mate

Instead of spawning object i used Object Create
Tested it few times and it works
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Post » Thu Feb 28, 2013 3:19 am

Wow, how simple. I thought I had seen "Create" somewhere but I didn't think to look at the System properties. I won't soon forget that. Your game looks fan-freakin-tastic by the way! Beautiful graphics. Looks very professional. Thanks again Pakost!
B
14
S
6
G
3
Posts: 71
Reputation: 3,811

Post » Thu Feb 28, 2013 9:19 am

Happy to help
I had a hard time too with spawn/create objects
And thanks for the good words bout the game
B
12
S
3
G
1
Posts: 120
Reputation: 1,829

Next

Return to How do I....?

Who is online

Users browsing this forum: austinblackbelt, Yahoo [Bot] and 21 guests