| |
Created objects in MMF2 randomly "sync" unwantedly, Sorry to ask another question
Someguy |
|

and oh my god it’s YOURS
![Ultra Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/uhappyheart.gif) ![Minigame Comp Winner Badge (2) [*]](https://archive.mfgg.net/html/badges/mcg2.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif) ![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif)

Group: Members
Posts: 4749
Member No.: 48
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
I hope that it was okay to make another help topic, I don't want to be begging people for answers... it's just, I have an object with a hand made simple gravity thing applied to it, and have it set so when it's not overlapping an object that represents a small bit of ground for it to be in walk mode, it switches a flag on to go into jump mode, and when it touches that again, it goes back into walk mode. Works fine, for the most part...
But when I have the engine generate a bunch of these objects from the same source, one per frame(or even less), with different speeds and whatnot, they like to end up syncing up, and thus having a ton of these objects walking off a cliff until the last one of a group walks off and they all act like they've stopped overlapping.
Because what code I have is small, I'll type it out, in case anyone can recognize an issue. Note that the object's name has been changed to CHAR to hide what it's for, don't want to reveal what it's for yet. Also note that the CHAR object uses a ball movement for horizontal movement, just to make it a bit easier and have less code.
| QUOTE | NOTE: CHAR is the object. Flag 0 if on is the gravity flag. Alterable Value B is the current Y velocity, A is used to lower the speed it goes up/down. 1 - Start of Frame: Set object CHAR speed to Random(10)+3 [Makes the CHAR objects already placed start walking at random speeds, to help separate them] 2 - Always + Character internal flag 0 is on: Add 1 to CHAR Alterable Value A, Set CHAR Y position to Character Y + CHAR Alterable Value B [When gravity is on, add 1 to alterable value A, and set Y position to Y + alterable value B to move according to gravity] 3 - Alterable Value A of CHAR = 4, CHAR internal flag 0 is on: Set CHAR Alterable Value A to 0, Add 1 to CHAR Alterable Value B [When Alterable Value A reaches 4 and gravity is on, add 1 to the gravity and reset A, so it's slower] 4 - Alterable Value B of CHAR <= 0, CHAR internal flag 0 is on: Change animation sequence to Jumping 5 - Alterable Value B of CHAR > 0, CHAR internal flag 0 is on: Change animation sequence to Falling [For animations] 6 - CHAR is NOT overlapping GROUND OBJECT, CHAR internal flag 0 is off: Set Alterable Value B of CHAR to -3, Set internal flag 0 of char on [When it's not on the ground, turn gravity on, start off with a jump as it just walked off a cliff] 7 - CHAR is overlapping GROUND OBJECT: Set internal flag 0 of CHAR off [When it overlaps ground, make it stop falling] 8 - Alterable Value B of CHAR > 8: Set Alterable Value B of CHAR to 8 [Keeps it from falling too fast] 9 - CHAR is overlapping GROUND OBJECT, CHAR's ball movement isn't stopped: Change animation sequence to Walking [If it's moving on the ground, make it walk] 10 - CHAR is overlapping TURN RIGHT OBJECT: Set CHAR direction to right 11 - CHAR is overlapping TURN LEFT OBJECT: Set CHAR direction to left [Just for changing directions] 12 - Y position of CHAR >= 200: Set alterable value B of CHAR to Random(10)*-1 [For now, if it ends up falling off of the level, make it bounce back up, randomly(to help differentiate mass amounts) 13 - CHAR internal flag 0 is off, CHAR is overlapping a backdrop: Set CHAR Y position to CHAR Y position - 1 [If it's overlapping ground, push it up out of it] 14 - Repeat while Space Bar is pressed: Create CHAR at (1,43) on Layer 1 [Hold space bar to generate mass amounts, as it's for something requiring a ton of these simple objects to move independently] |
I want to show a screenshot of the area I'm testing this in... but I have a feeling it'd pretty much reveal what it is.
--------------------
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
so i made this according to your events and all the objects do is bounce constantly (which i assume is not what you want)
you're probably just running into object selection issues and those are usually a ***** to debug period without having the problematic app
This post has been edited by Xgoff on May 27 2008, 12:14 AM
--------------------
 DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth: DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above| QUOTE | (5:25:58 PM) Mikau: xgoff (5:26:00 PM) Mikau: guess what (5:26:04 PM) Xgoff: chicken butt (5:26:09 PM) Mikau: **** you |
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
[ Script Execution time: 0.0534 ] [ 15 queries used ] [ GZIP Enabled ] [ Server Load: 2.01 ]
| |