User Tag List

Results 1 to 5 of 5

Thread: a little problem with spreading values

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    a little problem with spreading values

    I'm using enemy spawners in my game that create three enemies when active.
    I'm using a value to determine how many enemies the spawner is able to create, and when the enemy is created the value spread amongst the spawners is being transfered to the enemies (to determine which spawner they are created from).

    What I'm trying to do, and where everything inevitably messes up, is to destroy an enemy and at the same time subtract from the enemy-amount-value from the spawner, making it able to create another enemy in the place of the one that just got snuffed.

    However, it seems that no matter how i go about doing this, i end up with unwanted results, such as the enemy-amount-value only being subtracted from a different spawner even if the event tells to only subtract the value from the spawner which spread value equals that of the destroyed enemy.

    Any ideas?

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: a little problem with spreading values

    Try using the selected objects extension- this extension checks how many objects are currently selected by MMF.

    For example, the code:

    If ID("enemy") = 1

    -Set global value A to NoOfSelectedObjects("Selected objects")

    Will set global value A to the number of objects that have an ID equal to 1.

    So if you fastloop though your Spawners one by one, check how many enemies have the same ID as that spawner and if it is less than the minimum amount spawn another enemy.

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: a little problem with spreading values

    Thanks for the reply!
    I'd really like to try this since it seems like it could fix my mess. Problem is, i can't seem to install any new extensions or update MMF on my current (temporary) computer.

    Is there any other ways without using extensions, and preferably without using external values and counters, since I'd like to make it as flexible as possible?

  4. #4
    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: a little problem with spreading values

    Quote Originally Posted by ruffgang
    I'd really like to try this since it seems like it could fix my mess. Problem is, i can't seem to install any new extensions or update MMF on my current (temporary) computer.
    If you have problems installing updates and bonus packs then please fill in the official contact form at http://www.clickteam.com/eng/contact.php and provide your problem details, contact information and purchase details. A Clickteam support representative will then work with you to solve the problem.
    .:::.Joshtek.:::.

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Posts
    85
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: a little problem with spreading values

    Thanks, but the reason i can't update is because i don't have the install discs with me. Adding certain extensions seem to result in random crashing when trying to add it in the frame editor, which is typical for this computer (everything crashes everything).
    Regardless, some tips or ideas on how to solve this without extensions would be very much appreciated!

Similar Threads

  1. Spreading values in a random order across an array
    By Ibis in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th September 2012, 04:34 AM
  2. Duplicates and spreading values
    By KaiseanGames in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 14th January 2011, 03:14 PM
  3. Spreading Values Over New Objects
    By variant in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 29th November 2009, 04:26 AM
  4. Having trouble spreading values on detectors
    By ionside in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 25th March 2009, 01:42 PM
  5. Spreading Values
    By stAtrill in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 29th January 2007, 04:47 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
  •