User Tag List

Results 1 to 10 of 10

Thread: objects help

  1. #1
    No Products Registered

    Join Date
    Dec 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    objects help

    how to make a object follow the playe?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: objects help

    Short answer: Make it use bouncing ball movement and always look in the direction of the player.
    .:::.Joshtek.:::.

  3. #3
    No Products Registered

    Join Date
    Dec 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: objects help

    yes but i want the object go to the player when is close not all the time thankyou

  4. #4
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Location
    Turku, Finland
    Posts
    1,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: objects help

    "Enemy" X-position < 100 from "player" X position -> Set direction to "Player". I don't know if that works, but it sounded pretty basic. Oh, and the same for Y position. No... I doubt it will work like that. Well, try playing with X and Y positions.

  5. #5
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: objects help

    That would work for checking distance in one dimension, though I'm not sure how you're wanting the distance calculated... if you want the object to detect when it's a certain distance away in two dimensions, look at the Distance Formula on the two objects.

    The distance between the two objects = Square root(X(("Object 1")-X("Object 2"))^2 + Y(("Object 1")-Y("Object 2"))^2)

    You'd then check the result of that formula against the minimum distance you want to detect at before allowing the object to follow the player.

  6. #6
    No Products Registered

    Join Date
    Dec 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: objects help

    it doesnt work it set syntax error whit that formula .

    you know i did that before in multimedia fusion 1.5 but
    i dont remenber how .

  7. #7
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: objects help

    You will get a syntax error if you paste it directly. Look at the expressions available in MMF2, replace the names with those of your objects.

  8. #8
    No Products Registered

    Join Date
    Dec 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: objects help

    you know i have this two objects

    1(zombie
    2(player

    I want the zombie follow the player when it gets close.
    so you are telling me to replace zombie for object 1
    and player for object 2, True or False
    thanks

    like this

    (X(("zombie")-X("player"))^2 + Y(("zombie")-Y("player"))^2)

    syntax error again

  9. #9
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeå, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: objects help

    sqr((X("zombie")-X("player")) pow 2 + (Y("zombie")-Y("player")) pow 2)

  10. #10
    No Products Registered

    Join Date
    Dec 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: objects help

    Im sorry but syntax error again daniel ,i think it cant be do
    im puting the same code in the zombie x position but apear syntax error, im geting crasy whit this.

Similar Threads

  1. Hidden objects (it thinks objects inside the screen are outside?)
    By SoftWarewolf in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 16th December 2012, 11:15 PM
  2. created objects create objects and destroy both.
    By wizlore in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th September 2012, 08:37 PM
  3. Compairing 'Objects AltValueA' to 'Objects AltValueB' dont work
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th May 2012, 12:27 AM
  4. Objects creating a line of objects to an obstacle
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th March 2012, 08:22 PM
  5. Collisions Between Active Objects & Image Objects?
    By mkj5025 in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 18th February 2009, 08:58 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
  •