The Daily Click ::. Forums ::. Non-Klik Coding Help ::. mmf2 bring to front problems
 

Post Reply  Post Oekaki 
 

Posted By Message

Jeff Stark



Registered
  15/09/2012 22:50:18
Points
  2
15th September, 2012 at 15/09/2012 23:04:57 -

Hey, I'll try and make sure to explain my issue as specifically as I can.

I've been making a game for a few months, I have probably bit off more than I can chew but it's a good hobby. I have a character that moves around and a house etc. etc. Today I finished spriting some weapons for the character. My code is something like:

if global value (weapon)= 1 --> create sword1
(new event) if sword1 is visible --> select position at 0,0 relative to player
(new event) always --> bring sword1 to front.

I start the game, push the button for the sword, check the command prompt, global value (weapon) does change to 1, and the sword is created, and is clearly visible behind the player. Not only that, if you go inside, it disappears entirely behind the backdrop of the house. So it's not possible that I have my player set to always front as well, if that were the problem, it wouldn't go behind the backdrop. (which is behind many other objects)

I have triple checked layers, I have tried the sword on the same layer as the player, the layer above, the layer below. I make sure that it is at the front before the frame even starts, all is well, I can click and drag it in front of the player, house, etc. Start the frame, behind everything.

I have even tried the opposite (send to back) on the off chance that mmf2 was the only system in the world where back meant closest to the guy at the keyboard. I am at a loss. I am aware that without the file there's only so much you can do, but has anyone had a similar problem? Or is there something obvious I'm missing?

 
Jeff

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
16th September, 2012 at 16/09/2012 10:07:15 -

Have you checked what layer the sword is being created on? Under the creat option right click on the event and edit it. On there you should see a create on layer X option. It sounds like you have created it on layer 1 here.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click