The Daily Click ::. Forums ::. Klik Coding Help ::. Multiple Objects
 

Post Reply  Post Oekaki 
 

Posted By Message

Diefox

Possibly Insane

Registered
  23/02/2003
Points
  3481

VIP MemberGOTM -SEPTEMBER 2009 - 2nd place!GOTW WINNER APRIL 2010!
30th June, 2008 at 23:18:59 -

I'm having LOTS of trouble about making something that seemed so simple in MMF2 at first, making multiple objects. my problem is: I have a object called dummy, and on this object I fix thre other objects, the enemy sprite, the enemy collsion box and the enemy ground detector and everything works fine, but when i try to make instances of all those objects it turns into a mess.

the think I tried to do and was sure that it would work is: spreading values for the enemies dummy and the collisors, then i put an event like this:

if alterable value Z (dummy) = alterable value Z (ground sensor) then
set x position of ground sensor to x position dummy.

I tried so many things, don't know what else can i do to make that work, hope you can help me out.

 
__________
amandapps.com

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
1st July, 2008 at 10:21:58 -

It seems like that should work... Multiple instances is another MMF headache. I believe Clickteam should improve it... maybe some way to identify individual instances of one object easier. Hmmmm... HEY CLICKTEAM!

EDIT:It might be a headache, but the only thing that pops into mind is making more than one set-- just make however many will appear on screen at the same time. Then they can all have separate events. OR, I don't know if this will work... Make sure the detectors overlap the enemy, and then have it say: If detector is overlapping enemy, set detector to such and such X and Y of enemy. Somehow, having "one object is overlapping another" seems to point to which object you're refering to better.

Image Edited by the Author.

 

  		
  		

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
1st July, 2008 at 21:23:58 -


Originally Posted by OldManClayton
It seems like that should work... Multiple instances is another MMF headache. I believe Clickteam should improve it... maybe some way to identify individual instances of one object easier. Hmmmm... HEY CLICKTEAM!



Spread Value and MMF Loops! Look up some articles on it.

Edit:
Infact, here's an example I made a while ago for someone else asking a very simliar problem.

http://www.filedropper.com/loopexample

You only need 1 detector for an unlimited amount of actives. I then apply this idea to make more complicated engines, with gravity etc.

Image Edited by an Administrator.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy
   

Post Reply



 



Advertisement

Worth A Click