Break a Box (like angry birds)
Hi G-Saladers!
How can i break boxes like in the angry birds game?
Wood boxes, stones, etc...
What's the strategy for that?
I need to break it aith a ball in my game...
Any help please?
thanks so much guys!
How can i break boxes like in the angry birds game?
Wood boxes, stones, etc...
What's the strategy for that?
I need to break it aith a ball in my game...
Any help please?
thanks so much guys!
Comments
But i need to know how my ball will interact with the boxes... i mean if the ball come soft on the box it will not break it... But break it with faster velocity.
I don't know how to explain it (i really need the box rules)
And then based on that number determine what happens The higher the number the faster its moving.
BTW. That expression should give you a single positive number for the velocity of the object in case you where wondering what it all meant.
Hope that helps.
Aaron
___________________________________________________________________________________
TEMPLATES AND PROJECT HELP BY TENRDRMER. CLICK HERE!!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes
then another rule when self hit = 2 change image to the broken image, so on and so forth then on your self hit = 0 make an image of a splinter of wood and use particles to spawn that splinter of wood or rock or whatever with rotation and size to give it that smashed feel,so then you get the deterioration of the damage cause by hitting it and then the explosion hope this helps,im far from good at using GS so someone else may have a better way of doing it
Or just don't worry at all about blocks hitting other blocks (as fas as damage is concerned). Then you could constrain game.BallsVelocity (real) to magnitude(linear.motion.X,linear.motion.Y). This will give you the speed of the ball in any direction. Then use this value to determine if the block should be destroyed on collision.
Maybe some of you have a demo for that?
Can you send me a little demo with some blocks please?
(sebby_zzzz@hotmail.fr)
Thank you
constrain attribute:
game.Ballpower = self.motion.angular velocity
If all:
ball overlaps/collides with box.
Game.ballpower > "some high number.idk"
destory box.
just a guess.
in an unlocked block instance.
Rule
when collides with bad guy1
change self.hitforce to magnitude(self.linear.velocity.X,linear.velocity.Y)
change current.scene.layer1.abadguy1.hitpoint to current.scene.layer1.badguy1.hitpoint + self.hitforce
Then in the bad guy. When hitpoint > ???? destroy
you cannot use one global attribute because the bad guys are almost always overlapping or colliding with a block so the global attribute would not get set accurately. You would either need a game attribute for each block's hitforce (constrained to that magnitude formula above) or else unlock each block and add that rule for EACH bad guy.
So here's a quick tip. Get one level working with a bunch of extra blocks. Then copy and paste this scene for each level you are going to make. Otherwise you are going to be unlocking instances for every level and you will go insane!
good luck!