The Daily Click ::. Forums ::. Klik Coding Help ::. How make a tiggered action that only applies to one duplicate of an object
 

Post Reply  Post Oekaki 
 

Posted By Message

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
17th October, 2011 at 03:10:16 -

What is the best way to make an object react to the player being near it or colliding with a trigger without having all the duplicates of that object react as well?

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
17th October, 2011 at 04:56:03 -


If each object has its own seperate trigger then you should use spread values.
Here's an example: http://www.4shared.com/file/jAeVNSCb/spread.html

Maybe if you upload your mfa we can help you better...

Goodluck!

 
n/a

Ecstazy



Registered
  04/01/2002
Points
  179

VIP Member
17th October, 2011 at 10:26:48 -

I asked the same (I think) question a few days ago:

Originally Posted by Ecstazy
I have a few actives (the same object) walking from from side to side back and forth. I wanted to emulate gravity so I put a detector on the floor, and whenever one of the actives isn't overlapping it, it needs to change to animation sequence "falling" and increase its Y coordinate.
It worked fine before the update, and now it doesn't if there's more than one copy of the object.

I figured that the logic behind MMF2's events is that you condition, and then it creates a "list" with all the possible candidates, and performs the actions on them. But now as long as there's still another object overlapping the ground detector, it refuses to work.

The events I have regarding that are:

* Active ISN'T overlapping detector
= Set Y of Active to Y("Active")+1
= Set animation sequence to "falling"

* Active IS overlapping detector
= Set animation sequence to "walking"



Though in my case there's one trigger for all the objects...

 
Amongst Strangers
http://www.create-games.com/project.asp?id=1445
   

Post Reply



 



Advertisement

Worth A Click