Posted By
|
Message
|
Spitznagl Cabinetmaker
Registered 06/12/2008
Points 4260
|
30th August, 2009 at 20:55:58 -
Other than the active object, is there an object that considers transparent pixels when checked for collision?
Sadly, the active picture and the animated picture don't seem to, and I need the image to be external.
...
|
Sketchy Cornwall UK
Registered 06/11/2004
Points 1971
|
30th August, 2009 at 22:07:06 -
Why do you say "other than the active object"?
You can load an external image using the "load frame" action.
Is there some other reason for not using an active?
Edited by Sketchy
n/a
|
Spitznagl Cabinetmaker
Registered 06/12/2008
Points 4260
|
30th August, 2009 at 23:18:26 -
No there isn't.
I just didn't know actives could load external images. 0_0
I guess everything's fine then. Thanks!
...
|
Watermelon876
Registered 16/04/2009
Points 27
|
31st August, 2009 at 00:36:26 -
It's also useful for changing hotspots and action point. Also, active picture does do it, depending on the settings.
Awesomeness is Watermelon.
*/l、
゙(゚、 。 7
l、゙ ~ヽ
じしf_, )ノ
This is Koji. Copy and paste Koji to your sig so he can acheive world domination.
|
MBK
Registered 07/06/2007
Points 1578
|
31st August, 2009 at 21:30:41 -
You can use FLI or FLC files for transparency.
I'm not sure how it deals with collisions though, but maybe there is a way to code it based upon the position of the picture.
Positional testing usually works better than collision systems anyway.
Plus with position tests you don't need any detectors at all to obtain a good collision system.
If the object doesn't allow testing of the position and doesn't allow for proper collisions, then I guess you're out of luck.
Hmm, I just checked and I don't think another object besides the active object exists for good collisions by saying if this overlaps that, then do this.
This means that you'll probably need to learn to use Positional Testing as I have mentioned.
Basically, you'll need to use the Animation Object and put in code something like the following:
If x position of enemy > x position of Animation Object + 10 and < x position of Animation Object + 20
And If Enemy is walking left ...
... Then set Enemy position to its current position + 5 and Set Animation Object position to its current position - 5
... And decrease Hero Health by 1 heart
But If x position of enemy > x position of Animation Object + 10 and < x position of Animation Object + 20
And If Enemy is walking RIGHT ...
And If Hero Speed > positive 30 ...
... Then set Enemy position to its current position + 5 and Set Animation Object position to its current position - 5
... And decrease Enemy Health by 1 heart
Something along those lines ....
Hope this helped.
EDIT: oops ... I didn't see that Sketchy already gave you a solution until I posted .. heh .. well, maybe this will be useful to someone else. I just went by your post "other than the active object" ..
Edited by MBK
Click Me! http://www.create-games.com/project.asp?view=main&id=1444
http://www.mediafire.com/download.php?aoo1dnnlq5i
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?
|
UrbanMonk BRING BACK MITCH
Registered 07/07/2008
Points 49667
|
1st September, 2009 at 01:23:23 -
ummm, MBK
You could just use the distance formula.
Sqrt((x1-x2)^2+(y1-y2)^2)
n/a
|
Rox Flame Creative Talentician
Registered 06/10/2004
Points 383
|
18th September, 2009 at 14:24:51 -
@Sketchy
HOLY CRAP! was very much unaware of the active objects ability to load an external image into a frame... This is going to simplify things for me in a big way, cheers!
Current project:
Dynabrick (%70)
|
|
|