The Daily Click ::. Forums ::. Klik Coding Help ::. Bring to front! Bring to back! Aargh!!!
 

Post Reply  Post Oekaki 
 

Posted By Message

en kerro



Registered
  21/10/2004
Points
  578
31st January, 2006 at 17:18:44 -

I have big problem with bring to front and bring to back events.. I try to explain it:
Objects:
Player
Tree (active object)
Detector
player's shadow

Events
Blue detector is supposed to be invisible.
Shadow has 8 directions movement, player's position is always 0x,-40y from shadow.
If player's shadow collides with tree detector, it stops (shadow can't overlap detector)

And the main thing, where is the problem:

y of player shadow is bigger than y of tree=> bring tree to back
y of player shadow is smaller than y of tree=> bring tree to front

And so, player can go behind the tree and can be in front of it.
It works with ONE tree...
BUT if I add more of them, it will go crap.
I know where's the problem because event effects to every tree. But how to get it so it would effect only in one tree. One way is to add dozens of tree objects (like tree 1, tree 2, tree 3...) But I know it's not the best idea.
Any help?
Image

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

Johan Hargne (Wartagon)

Lover Of Circys

Registered
  15/06/2003
Points
  1289

Game of the Week WinnerCROBASOFTVIP MemberPS3 OwnerWii OwnerMushroom
31st January, 2006 at 17:24:20 -

Did you group them?

 
Music Composer.
http://johan.hargne.se

Crobasoft
www.crobasoft.com

en kerro



Registered
  21/10/2004
Points
  578
31st January, 2006 at 17:32:04 -

no... only problem is that the "bring..." events effect to every tree in the play area!

http://personal.inet.fi/koti/ptsoftware/images/argh.PNG

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
31st January, 2006 at 19:11:14 -

You double posted this thread.

 
n/a

Kai Proton



Registered
  31/01/2005
Points
  201

Wii Owner
31st January, 2006 at 20:10:28 -

I am having the Exact Same Problems with the Layers,

In my case Ive got a Moon, at the back, and 3 layers of Clouds moving past,
but the layers on the clouds change and go behind the moon and all kinds of crap,

I wantedto use the Layer object in MMF, but I cant understand how it works, can anyone help me too ?

 
----------------------
Time for a Sexy Party!
----------------------

David Newton (DavidN)

Invisible

Registered
  27/10/2002
Points
  8322

Honored Admin Alumnus
31st January, 2006 at 22:29:46 -

I posted what I thought was a solution in the other thread with this name - did it work at all?

 
http://www.davidn.co.nr - Games, music, living in America

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
2nd January, 2006 at 00:53:31 -

im making a 3/4 view RPG and i have hundreds and hundreds of objects like this, what i do is cut the picture the height of the player, the bottome half make a background object with a collision setting, the second half make an active and just layer it in the editior.
That works perfectly for me.

 
n/a

en kerro



Registered
  21/10/2004
Points
  578
2nd January, 2006 at 04:17:48 -

Oops, sorry for double post. When I posted this first time, daily click just stopped working for a while (the page cannot be displayed...) so I though that topic wasn't here.

Antworx: I have used that way, but it is not so good because backdrop object must be higher than player... or it goes crap as well.

I try to use wong's advice. I try.

 
Current Projects:
The Artillerys 10%
Forgotten Legends 8%
Earth Defender 20%
   

Post Reply



 



Advertisement

Worth A Click