User Tag List

Results 1 to 5 of 5

Thread: Groups and Object Selection

  1. #1
    No Products Registered

    Join Date
    Jun 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Groups and Object Selection

    Once again I encounter dreaded object selection "bugs" in Multimedia Fusion!

    I have a platform engine set up that is applied to the group "Player." The way input for this engine works is flag 10 represents the right key, and flag 11 represents the left. So if I want an enemy to move right, I set flag 10 on for it.

    Each object has its own acceleration values, sort of like friction. So when flag 10 is on, it should add that accerlation value to the object's xspeed, and then the platform engine does its thing. Each object also has its own maximum speed and events to check to make sure that its speed doesnt exceed the max.

    Thats where the problem lies. Right now I have a player, and an enemy. They each have different max speeds, acceleration, etc. The enemies move around just fine, until the player moves. When an enemy is moving right, and the player also moves right, the enemy's movement begins to freak out. It seems to be grabbing alterable values from the player object instead of itself.

    I'm not doing any "compare two general values" or anyting like that that might muck up the object selection. My events are as simple as

    Flag 10 is on
    -> Add acceleration to xspeed
    Flag 11 is on
    -> Sub acceleration from xspeed

    Something like that. I dont want to fast loop through every object in the players group, because thats going to create more lag than there already is in my game.

    If anyone has any potential ideas, please let me know. This is driving me crazy -_-

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Tiles's Avatar
    Join Date
    Jun 2006
    Posts
    1,359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Groups and Object Selection

    Fastloop is the only valid solution here in my opinion.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Groups and Object Selection

    I do not really understand your problem. Can you make an example and send it to me? With explanations on what is going wrong?

  4. #4
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Groups and Object Selection

    You can try using the following code to limit the speed of your objects if thats whats causing the problem.

    Flag 10 is on
    -> Add min(acceleration, maxspeed-xspeed) to xspeed
    Flag 11 is on
    -> Sub min(acceleration, maxspeed+xspeed) from xspeed

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Groups and Object Selection

    I may have figured it out with fast loops, actually.

    I'm trying to avoid spreading a value and fast looping for every object in the platform engine group, because thats going to cause some lag. But I think by just using the fast loop comparison with the spread value on some choice events (Such as the one that limits the speed compared to the max speed variable) I was able to solve the problem.

    Now, I really dont know for sure if its fixed at this point until I start getting into more advanced enemy behaviors, but for now it looks like everything is working out.

Similar Threads

  1. Object Groups?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 14th August 2013, 01:15 PM
  2. Object Selection with Groups
    By Crash86 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st June 2013, 12:37 AM
  3. Object selection
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 2nd September 2009, 10:56 PM
  4. More info on Object Groups?
    By CKX in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 15th February 2009, 11:46 AM
  5. Making object groups
    By GameDesigner in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 30th March 2007, 02:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •