-
Help with event
Hi
I found an older project with some gravity effects for all items I give a certain group, but I have some trouble putting these items on top of each other.
I took a screenshot of my events here:
http://img.xrmb2.net/images/611381.png
Event Info
The ForEach loop was needed when I pickup boxes to prevent the game from destroying more than 1 box at the time (picking up 1 box at a time). The green square is a bigger detector that is simulating the area infront of the player (player = light red square) also to prevent the player from dropping any box into a wall. The Active Icon object is just an object I use values on to separate the two action events. I had a problem when he picked up, and putted down in the same click. PickUp of player is to check if the player is already holding a box or not. The group: Collectables are all the objects that have this gravity effect. Each item in this group also have their own ID in alterable value C to tell the game what kind of item you picked up. Those Wall Blocks in event 64 is ID 1, therefore PickUp of player is 1. Group 0 = The ground, which stops all Collectable group objects from falling. Group 2 Collectable group objects that are capable of standing upon each other. And last, group 3 is Collectable Objects that are not capable of having another Collectable item upon itself.
My question:
I can say that for now, there are ONLY 1 kind of Collectable objects in my game: The Wall Block. I have 3 of them in my game, but group 3 is still inactive. Anyway, when I drop one of these Wall Blocks upon another, it does not land and end with the same smoothness. Its usually a few pixels down in the box it lands on. At the same time, ALL the boxes in the frame moves 1 pixel up, which kinda looks weird. Does anyone have any ideas on how to have this very same floor effect when group 2 lands upon group 2? This is my main question in this thread, but I also have another question. As I did not "invent" these events (got help somewhere), Im kinda curious about what the "Min" in event 71 does.
All replies are appreciated! :)
-
Oh noes! More trouble.. :( Apparently, when 2 boxes are on top of each other, the gravity stops :(
-
Scratch that last comment, problem solved! Thank you very much, ForEach object :)
Scratch that again... If you manage to pick up the bottom box while having 2 more atop of each other above, those 2 will be stuck in the air.. Darn, this is hard!
-
I think the best thing to do is upload the mfa and let someone look at it. Most of the time it's something that was missed or a bad line of code. Sorry I couldn't help.
-
You are probably right. I uploaded here.
I have came across some other very similar examples, but the thing is, I like knowing whats going on and I didnt get the other ones enough to change on stuff I wanted. It would be very nice if the events could be somewhat like this :) Oh, and Ill post the needed extension in the file archive thread :)
-