The Daily Click ::. Forums ::. Klik Coding Help ::. Object precise overlapping question
 

Post Reply  Post Oekaki 
 

Posted By Message

vetmora120



Registered
  07/01/2010
Points
  273
24th September, 2011 at 13:03:12 -

Hi all,

Is it at all possible to check if the whole of Object_A is overlapping a specific point of Object_B? I'd like this done using a single object as there will be more than one of Object_B.

Thanks in advance!

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
24th September, 2011 at 16:37:45 -

Give object B a second animation which is maybe a 2x2 pixel. At the top of your event code, have it switch to that animation. At the bottom, have it switch back to its normal animation. Then, for the whole code section you want, it will only have the collision map of a 2x2 pixel- use hotspots to offset it properly

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

vetmora120



Registered
  07/01/2010
Points
  273
25th September, 2011 at 03:57:25 -

Thanks Pixelthief, I don't know why I never thought of that because I've used it in the passed for other occasions. I can't seem to get it to work however. I have the following events:


Always - set animation of Object B to collision map
If Object A is overlapping Object B - Add to alpha coef of Object B (make it disappear)
If Object A is NOT overlapping Object B - Subtract from alpha coef of Object B (make it appear)
Always - set animation of Object B to visual one


Am I missing something here?

 
n/a
   

Post Reply



 



Advertisement

Worth A Click