User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 32

Thread: Edge Enemy

  1. #21
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,301
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by King_Cool View Post
    No iOS support?
    It popps up under the available Objects for MMF2 iOS builds, when changing the build type to iOS...
    Is that missleading information?

    I was almost positive ForEach was common amongst the different Exporters, gues i was wrong...
    Im sure i heard plans about ForEach support for XNA, here on the forum.

    ForEach should be top priority among all Exporters in my oppinion.
    I think it is compatible with iOS. ExtensionView is outdated. It doesn't mention anything about Android, either. I don't have the iOS runtime, though, so I didn't want to say it was compatible when it wasn't. However, since it shows up when changing the build type to iOS, I think it is compatible.

  2. #22
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Del_Duio View Post
    So how does ForEach really work?
    FAST LOOP METHOD
    You have multiple Instances of a Bullet Object, and want to handle them seperatly withouth MMF2 confusing them.

    PREPERATION
    - Allocate an ID_ for Bullet using an Alterable Value
    - Spread Value 0 through Bullets ID_

    MAIN EVENT
    + Allways
    -> Start FastLoop "a" 'number of Bullets' times

    + On FastLoop "a"
    + Compair FastLoop "a" itteration index to Bullets ID_ value
    -> DESIRED ACTION

    There is nothing realy wrong with this method, its only that ForEach does this better and faster.

    ...
    FOR EACH LOOP METHOD
    You have multiple Instances of a Bullet Object, and want to handle them seperatly withouth MMF2 confusing them.

    PREPERATION
    None

    MAIN EVENT
    + Condition
    -> Start ForEach loop "a" for Bullet

    + On ForEach loop "a" for Bullet
    -> DESIRED ACTION

    ...
    You see how the two methods compair?
    ForEach object Itteration loops require no preperation or use of Alterable Values, you dont need to specify how many time the loop should trigger, you just ( 1 ) start the loop for the Object and ( 2 ) create desired action in the 'On loop' Event.

    When compairing the two methods, ForEach turn out faster, someone did a test but i cannot remember who.
    Im quite sure you can run regulars loops through the ForEach also ( meaning loops which are not specific to an object ).

  3. #23
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    900
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by King_Cool View Post
    FAST LOOP METHOD
    You have multiple Instances of a Bullet Object, and want to handle them seperatly withouth MMF2 confusing them.

    PREPERATION
    - Allocate an ID_ for Bullet using an Alterable Value
    - Spread Value 0 through Bullets ID_

    MAIN EVENT
    + Allways
    -> Start FastLoop "a" 'number of Bullets' times

    + On FastLoop "a"
    + Compair FastLoop "a" itteration index to Bullets ID_ value
    -> DESIRED ACTION

    There is nothing realy wrong with this method, its only that ForEach does this better and faster.

    ...
    FOR EACH LOOP METHOD
    You have multiple Instances of a Bullet Object, and want to handle them seperatly withouth MMF2 confusing them.

    PREPERATION
    None

    MAIN EVENT
    + Condition
    -> Start ForEach loop "a" for Bullet

    + On ForEach loop "a" for Bullet
    -> DESIRED ACTION

    ...
    You see how the two methods compair?
    ForEach object Itteration loops require no preperation or use of Alterable Values, you dont need to specify how many time the loop should trigger, you just ( 1 ) start the loop for the Object and ( 2 ) create desired action in the 'On loop' Event.

    When compairing the two methods, ForEach turn out faster, someone did a test but i cannot remember who.
    Im quite sure you can run regulars loops through the ForEach also ( meaning loops which are not specific to an object ).
    Wow you're right that is much easier all around. Thanks for going through the trouble of typing this all out for me, I'll put it to good use King_Cool!

  4. #24
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is also worth mentioning that:

    Some Conditions are Red.
    Events that start with a 'Red Condition', do internal loops through all Instances of the Object automatically ( Instance selection is correct for such Events ).

    ...
    Example:

    'RainDrop collides with Backdrop' is a 'Red Condition'.
    This means if 3 RainDrops collide with the Backdrop, the Event will trigger 3 times ( once for each RainDrop )

    ...
    Think about it like this:

    Events that start with a 'Red Condition', automatically does a FastLoop/ ForEachLoop thought the Object Instances in the Condition.

  5. #25
    Clicker Fusion 2.5 Developer
    SHINGEN's Avatar
    Join Date
    Apr 2015
    Location
    England
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Adding a delay

    Quote Originally Posted by happygreenfrog View Post
    Well, MMF2's object selection is terrible, so there isn't any other way to my knowledge. Fastloops are slower (and potentially less reliable) than ForEach loops. The ForEach object works with most runtimes, so there aren't really any problems with using it. If the personal reasons make using it impossible, then you will have to settle for the Fastloops, and live with the worse framerate that it will give you.

    I fixed the file you gave me using Fastloops, BTW. I probably could have lowered it to use one Fastloop, but I didn't. It should work okay, though. Enjoy!
    Hi there this helped me a lot but I wanted to know how to add a delay from when the edge is met followed by turning around and moving to the next edge like the enemies often do in Sonic The Hedgehog.
    Attached files Attached files

  6. #26
    Clicker Fusion 2.5 Developer
    SHINGEN's Avatar
    Join Date
    Apr 2015
    Location
    England
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Actually don't worry I managed to do it using 2 additional flags which seems lazy but it works!
    Flag1 disables movement while the delay is on countdown.
    Flag 5 (in my case otherwise flag2) also diables movement but turns off once the delay is over
    Attached files Attached files

  7. #27
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Patrice's Avatar
    Join Date
    Sep 2010
    Posts
    550
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Simply ?Example.mfa

  8. #28
    Clicker Fusion 2.5 Developer
    SHINGEN's Avatar
    Join Date
    Apr 2015
    Location
    England
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your response. I have never used foreach statements before, I will give it a tinker. Looks dead simple in comparison to what I had. Mucho Gracias

  9. #29
    Clicker Fusion 2.5 Developer
    SHINGEN's Avatar
    Join Date
    Apr 2015
    Location
    England
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to confirm, I replaced the fastloop formula for the foreach one and kept the sensors, it worked a charm. Thanks for your help

  10. #30
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    aenever's Avatar
    Join Date
    Jun 2013
    Posts
    1,274
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Here's Patrice's example, with delay and no need for detectors.

    Example from Patrice with Delay.mfa

Page 3 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. Edge Detection example
    By Jacob in forum File Archive
    Replies: 12
    Last Post: 4th February 2012, 01:52 AM
  2. Edge-Following Movement for AimeeExorcist
    By Eliyahu in forum File Archive
    Replies: 2
    Last Post: 3rd May 2011, 03:29 PM
  3. Window's Edge
    By FlinkGigitty in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 17th April 2011, 11:57 AM
  4. Edge of Awe
    By twister in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 7th May 2010, 08:08 PM
  5. Snap to screen edge
    By wizkidweb in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th April 2009, 11:05 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
  •