Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / image-collision

Author
Message
CaSSmAn
22
Years of Service
User Offline
Joined: 12th Apr 2004
Location: FRANCE
Posted: 28th Apr 2004 23:38
before i would like to know the difference between sprite hit and sprite collision.
And i would like to do something like that :

but the image of the collision isn't over the ennemy!
in addition if i use this methode my image have an outline black .Have i to make the image a sprite?!
Can someone help me ? plz

A shadow passed...
2D Analyst
AGK Developer
22
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 2nd May 2004 23:02 Edited at: 2nd May 2004 23:41
I'm a beginner just like you. For my collision, this is what I did:

if sprite hit(hero,ennemy)=1
SPRITE sameenemyspritenumber, posx,posy, imageofcollision
endif

The reason why your outline is black is because you already load the bitmap as an image, then paste it. You can avoid this by using these 3 commands in order: load bitmap, get image, then sprite. I hope this helps man. If you really want to paste image instead of sprite, you can do this:

SPRITE sameenemyspritennumber, posx, posy, imageofcollision
PASTE SPRITE spritenumberuwannacopy, posx, posy

This will get rid of it, but remember that your sprite background have to be in pure black meaning red=0,green=0,blue=0.

eatfishy

Login to post a reply

Server time is: 2026-06-09 13:57:00
Your offset time is: 2026-06-09 13:57:00