User Tag List

Results 1 to 2 of 2

Thread: How to get player to move an object

  1. #1
    No Products Registered

    Join Date
    Mar 2008
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get player to move an object

    I want it so that your player can go up to a certain object and move it.
    The only solution that I came up with was to make a group of events called Movement of Player and Mobile Laser ( the object were trying to move)
    And in each Group thers like, Movement=Start and Set Speed=36
    And at the start of level i made it activate Group Movement of Player and DeActivate the group Mobile Lasers.
    But when i start, when I move my player the laser moves with it automatically.

    I was gonna have it so that when u collide with a Switch it will ask ACTIVATE which will deactivate the Player's movement group and the Activate the Lasers movement group.

    So how do i make the laser Not Move at the start of the game and only when the player flips that switch?
    Or make it so i can shove the object my walking up against it?

    p.s. Both the player and the laser have movements of the 8-direction movement thing

  2. #2
    No Products Registered

    Join Date
    Aug 2008
    Location
    Yorkshire, UK
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to get player to move an object

    I see what you've tried to do. Unfortunately, setting the "Mobile Laser" to 8-Dir movement causes the program to regard it as a player object... since it is a player controlled movement. The fact that you deactivated its group simply cuts off any programming you may have given it.
    Because you said 8-Dir movement, i'll assume you are using a birds-eye view?

    Let us assume that you wanted to move the laser by switch, and between two points in a straight horizontal line, then...

    :confused:[color:#CC0000]An active object has values called 'Flags' that can either be turned on or off, or toggled between the two. GF2 can also refer to the On/Off condition mathematically... with On being equal to 1, and Off being equal to 0.[/color]

    When the player collides with the "Switch", toggle 'Flag 0'.
    [color:#3333FF]"Player" collides with "Switch" ---------- Toggle 'Flag 0'[/color]

    When the switch is off, move the laser to the right as far as X=600
    [color:#3333FF]When "Switch" 'Flag 0' =0 (Off)
    AND When "Mobile Laser" X-Coordinate < 600 ---------- Set X-Coordinate of "Mobile Laser" = X("Mobile Laser")+2[/color]

    When the switch is on, move the laser to the left as far as X=100
    [color:#3333FF]When "Switch" 'Flag 0' =1 (On)
    AND When "Mobile Laser" X-Coordinate > 100 ---------- Set X-Coordinate of "Mobile Laser" = X("Mobile Laser")-2[/color]

    Note that the numbers above... I plucked out of thin air. it doesn't have to be 2, 100 or 600.
    If you want different movement, or more complex movement, you'll need more complex programming. It depends on what you want though... :eek:

Similar Threads

  1. Move player while he's on a moving platform?
    By BartekB in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th November 2013, 04:25 PM
  2. Able to randomly make a character move towards player one?
    By koltzc in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 7th February 2013, 12:52 AM
  3. How do I make My player move as if it were snapped onto a grid?
    By Daniel_M in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 24th January 2013, 10:27 AM
  4. Want to select a player then make him move.
    By GameDesigner in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 27th February 2007, 10:00 PM
  5. How do I get movable object 'player' to move to gr
    By mobilwon in forum The Games Factory 2 - Technical Support
    Replies: 5
    Last Post: 13th December 2006, 06:14 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
  •