User Tag List

Results 1 to 5 of 5

Thread: I need help with a school assignment.

  1. #1
    No Products Registered

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

    I need help with a school assignment.

    Hello, my name is christoffer and i go to school in sweden. We were given an assignment to make a game until the summer that is as good as possible. I`m now stuck, since i am trying to get my character to have additional lives and i need some help with getting my enemies to spawn.
    If you get my game here here you can see what it`s like.
    The game is so that you see a space ship from an above point of view, you see the top of the player.
    on the top side of the screen, are enemies.
    I did manage by help form the forum here to get them to spawn random, BUT, sometimes the enemies spawn "on the edge" of the application. You can see half the enemies and half you cannot see. If anyone knows how to fix this, please help me ^^
    I also need help because i have NO idea at all on how to get the player to have 3 lives.
    Help is apreciated.

  2. #2
    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: I need help with a school assignment.

    For your enemy spawning issues, are you creating them then setting thier X position to a random number limited to the siz of the frame, like this?
    Random(640)
    or
    Random(Frame Width)

    If so, you can fix it so that the enemies will always center away from the edges, like this:
    Random(Frame Width - Width of Enemy Obejct) + (Width of Enemy Obejct / 2)
    It's the same thing, but now it accounts for the width of the enemy that could stick out the edge of the frame, and it will keep that from happening. If you're good at math you will udnerstand how that works.

    As for lives, TGF2/MMF2 have a built-in lives system for you to use! All you have to do to use it is edit the starting # of lives in the application peroperties (Click your application icon in the tree browser on the left side, then under that click the different icons in the properties pane until you fnd one that has the lives settings). There is a "Score" object and a "High Score" object for you to use as well. There is also a "Life" object that you will want for displaying the lives.

    With events, there is an object next to the keyboard object called the "Player 1 Joystick object". (if you add more players there will also be ones for players 2-4). With this object you can control the score and lives of your player.

    I hope that explains it all! Good luck on your project!
    Working as fast as I can on Fusion 3

  3. #3
    No Products Registered

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

    Re: I need help with a school assignment.

    Quote Originally Posted by LB
    For your enemy spawning issues, are you creating them then setting thier X position to a random number limited to the siz of the frame, like this?
    Random(640)
    or
    Random(Frame Width)

    If so, you can fix it so that the enemies will always center away from the edges, like this:
    Random(Frame Width - Width of Enemy Obejct) + (Width of Enemy Obejct / 2)
    It's the same thing, but now it accounts for the width of the enemy that could stick out the edge of the frame, and it will keep that from happening. If you're good at math you will udnerstand how that works.

    As for lives, TGF2/MMF2 have a built-in lives system for you to use! All you have to do to use it is edit the starting # of lives in the application peroperties (Click your application icon in the tree browser on the left side, then under that click the different icons in the properties pane until you fnd one that has the lives settings). There is a "Score" object and a "High Score" object for you to use as well. There is also a "Life" object that you will want for displaying the lives.

    With events, there is an object next to the keyboard object called the "Player 1 Joystick object". (if you add more players there will also be ones for players 2-4). With this object you can control the score and lives of your player.

    I hope that explains it all! Good luck on your project!
    I am using random(frame widht) But to make what you wrote, i just copy in



    Random(Frame Width - Width of Enemy Obejct) + (Width of Enemy Obejct / 2)

    or..?

    Thx for the lives part, i think i `ll get it to woork soon.

  4. #4
    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: I need help with a school assignment.

    The bolded parts Width of Enemy Obejct are the parts you have to replace with a number that is the width (in pixels) of your enemy obejcts.
    Working as fast as I can on Fusion 3

  5. #5
    No Products Registered

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

    Re: I need help with a school assignment.

    Quote Originally Posted by LB
    The bolded parts Width of Enemy Obejct are the parts you have to replace with a number that is the width (in pixels) of your enemy obejcts.
    Thx, solved it^^ And as you stated above, i am good at math xD

Similar Threads

  1. Combination of automatic and specific sound channel assignment possible?
    By JoKa in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th May 2012, 12:09 PM
  2. Dynamic PMO creation & assignment example.
    By Nifflas in forum File Archive
    Replies: 13
    Last Post: 15th July 2011, 10:39 AM
  3. problem with Mooclick ID assignment
    By Johnny in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th July 2007, 04:57 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
  •