User Tag List

Results 1 to 9 of 9

Thread: Player Position

  1. #1
    No Products Registered

    Join Date
    Mar 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Player Position

    I made a game where when i encounter an enemy, i go to a different frame. when i am done with that frame, i want to be able to go back and start from exactly where i was with all of the enemies i have killed still dead. however, i just end up and the very start of the frame.

    How can i save my progress on the frame so i dont have to restart everytime?

    also i have an offtopic question: How can i generate a random number from an objects alterable value?

    Example: enemy1 has 20 str. When enemy1 attacks player, pick random number 0-20, and subtract from players health.

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Player Position

    The first part is an engine design issue.

    For the random number, use random(21) should give you 0-20

  3. #3
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Player Position

    You would need to use Global Values or INI file to save everything and then load it back.
    Or maybe you could use Sub-App, to play the wanted frame within the current one. You could pause the original game and display the wanted frame in Sub-App. Then after finishing the frame from Sub-App, you would resume the first frame, so you would have everything back.

    (Sorry if I sound confusing, I'm a bit tired xD)

  4. #4
    No Products Registered

    Join Date
    Mar 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Player Position

    Thank you Jacob!!!
    Alright Pasiunia, your idea makes perfect sense, i just don't have a clue of how to do any of your examples. thank you for the reply though!

  5. #5
    Clicker Multimedia Fusion 2
    Greg's Avatar
    Join Date
    Dec 2006
    Location
    Poland
    Posts
    315
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Player Position

    You need to put an extension called "Sub-Application" into for example frame 1. Then when you want to go to 2nd frame, you just load it into the Sub-Application, so you don't lose any data from the 1st frame. After the 2nd frame finishes, you hide the Sub-Application and you're back in the 1st frame (actually, you've never left the 1st frame, the 2nd one was played within it).

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Player Position

    To expand on my last part, the random function works like this:
    random(range)+startPoint

    random(5) will give you 0-4

    random(12)+6 will give you 6-18

    random(16)-8 will give you -8 to 8

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Player Position

    Quote Originally Posted by Jacob
    random(12)+6 will give you 6-17

    random(16)-8 will give you -8 to 7
    Fixed for you.
    Working as fast as I can on Fusion 3

  8. #8
    No Products Registered

    Join Date
    Mar 2010
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Player Position

    Oh i see Pasiunia. thank you!
    Thanks everyone for the help!

  9. #9
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Player Position

    Right, LB. I wasn't thinking clearly it seems :P

Similar Threads

  1. Position relative et position absolue
    By volgot in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 20th March 2011, 04:08 AM
  2. Detect player position between frames.
    By Worf in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th December 2009, 05:28 PM
  3. OpenGL - 3D Player Position?
    By JGooler in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 12th September 2009, 05:38 AM
  4. Screen position relative to taskbar position?
    By Raylax in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd April 2009, 08:55 PM
  5. Position the player
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 5th March 2008, 01:41 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
  •