User Tag List

Results 1 to 7 of 7

Thread: Fastloop Spread Value question

  1. #1
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fastloop Spread Value question

    I left behind the Spread Value problems I was having for a while and made great progress in other areas of my project. Now I am returning to it a second time and I wanted to ask a question concerning where I'm stuck. I have never solved the issues surrounding the usage of this function of MMF, but the more I read (and read, and re-read) the more I gradually come to understand it relative to my current program.
    At the moment I have a setup where I am using fastloops to calculate physics for the NPCs in my game. I believe this is the area that is interrupting my successful use of Spread Value for NPC instances. Below you can see my current script for my NPCs gravity.



    I didn't annotate the events because I don't think it matters, I just want to better understand the conditions applied.
    After reading about more Spread Value usage on the Wiki, I want to ask how I can combine ^that^, with this -

    Always
    -- Spread Value 1 in "ID" of Enemy
    -- Start Loop "AI" 'nObjects("Enemy")' times

    On Loop "AI"
    + Value "ID" of Enemy = 'loopindex("AI")+1'
    -- { perform the actions we specify }


    Specifically, where does the fastloop for gravity fit into there? Do I use something like this?

    On Loop "AI"
    + On Loop "gravity"
    + Value "ID" of Enemy = 'loopindex("AI")+1'
    + AlterableValue Condition
    -- { perform the actions for NPC gravity }


    Obviously that won't work, so could someone better explain this function? Thank you for helping someone who is completely in over their head.


  2. #2
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fastloop Spread Value question

    It's possible the fastloops have nothing to even do with why my Spread Value does not appear to be working, as one of the NPCs detector objects correctly follows each of its assigned NPC, while the other detector does not.
    I posted the actual file with all unnecessary code stripped out over here:

    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=93896#Post93896

    In case someone wants to take a look at the actual code.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUnicode Add-onInstall Creator

    Join Date
    Jul 2006
    Posts
    1,018
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fastloop Spread Value question

    Sometimes the Spread value action must be used in a separated Event. In this case:

    Always
    -- Spread Value 1 in "ID" of Enemy


    Always
    -- Start Loop "AI" 'nObjects("Enemy")' times

  4. #4
    No Products Registered

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    1,141
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fastloop Spread Value question

    First of all, use spread value 0 and you won't need to add 1 to the Value = Loopindex event.

    To make it work with your gravity loop, use:

    * Always
    -- Spread Value 0 in "ID" of Enemy

    * Always
    -- Start Loop "AI" 'nObjects("Enemy")' times

    * On Loop "AI"
    + Value "ID" of Enemy = 'loopindex("AI")'
    -- Start Loop "gravity" X times

    * On Loop "gravity"
    + Value "ID" of Enemy = 'loopindex("AI")'
    -- { perform the actions for NPC gravity }

  5. #5
    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: Fastloop Spread Value question

    Fast loops mess up object instance selection and backburner actions such as spread value. Put them in separate events.
    Quote Originally Posted by Francois
    This is not a bug, this is how the action routines are coded. I perform several loops of actions. The first exploration of the actions, calls all the actions, including the one shot actions like loops, sound etc., and the object oriented actions for the first object to be explored.
    Then the next loops explores the remaining object oriented actions for the other objects, including the spread actions.
    So if you want your spread action to be executed before, just duplicate the line of events.
    .:::.Joshtek.:::.

  6. #6
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fastloop Spread Value question

    Thank you very much for all the replies. I will spend some time with all this feedback and see if I can make some more sense of it.

  7. #7
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fastloop Spread Value question

    - deleted for the sake of all mankind -

Similar Threads

  1. Spread value question
    By Stefan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th March 2012, 01:00 PM
  2. Just a fastloop question.
    By kjellm87 in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 20th July 2011, 06:52 AM
  3. fastloop question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 16th February 2009, 11:26 PM
  4. Another spread value question
    By ionside in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th February 2009, 09:00 PM
  5. yet another spread value question
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th June 2008, 01:17 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
  •