PDA

View Full Version : A little help with If/Else please?


savyxox
10-12-2009, 10:54 AM
I'm making a game, where there's this giant squirrel and it's destroying all these buildings.
So far I've made Walk, Jump, Kick and Punch methods.
I need help with the If/Else statements though.
What I want is, that when the Squirrel, let's say Kicks, a certain building, it'll resize.
Thanks:)

x2495iiii
10-12-2009, 02:25 PM
Try this:

do together
squirrel.kick
if Squirrel is within (buildingWidth) of building and nuilding is in front if squirrel
building re-size .1

This will mkae it so that if the squirrel is relatively close to the building and the squirrel is generally facing the building, it'll re-size.