ok so i'm making a game kinda of like mario and i want to make a sprite do damage if it touches another sprite but not if its being jumped on the head. i saw a game some one made where there were gray areas on a sprite where im guessing he used variables??? i cant find the game again so im asking for help. can anyone explain how to do this?
Offline
[ Actually what you do is paint one part [COMPLETELY ON THE SIDES](LEFT/RIGHT/UP/DOWN) of mario/enemy in 1 colour and the other in other colour.
So you use [blocks] <touching color[ [/blocks] to do your work.
e.g see this script. [I supposed mario's shoes are black and nothing in the surroundings is black.]
script for enemy-
[blocks] <when green flag clicked>
<forever if><touching[ [/blocks] mario [blocks]<< <and><< <not><touching color[ >> [/blocks] BLACK [blocks] >> [/blocks]
Offline
coolstuff wrote:
What do you mean by 'gray areas?' I'm sorry, I don't quite understand what you're asking.
He had areas sheaded gray to show where the different perimaters were they wernt actualy part of the sprite. what i want to happen is if "mario" touches the front or back of the other sprite then he will lose health but if he jumps on the sprites head then it will "kill" the other sprite.
Offline