User Tag List

Results 1 to 8 of 8

Thread: Question about making my enemy duplicates unique

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Question about making my enemy duplicates unique

    Hi again. So I have begun to link alterable variables to duplicates of enemies to give them unique behaviors. I am now running into a problem where I have set the enemies to fire when they reach a named node on a path, but all duplicates of the enemy fire a bullet when ANY of the duplicates reach their respective named node.

    The expected behavior is that each enemy fire a bullet only once when they reach their respective named node. If anyone has time, can they please take a look at my file and let me know what I am doing wrong?

    Thanks in advance,

    Mobichan

    latest version of my game

  2. #2
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about making my enemy duplicates unique

    That is quite odd.

    I've only been looking for a couple of minutes (always takes a while to adjust to code I've not written myself). Is there a reason you've gone for 'set Unique ID to 1', 'set Unique ID to 2' rather than just:

    ALWAYS
    - Spread Value 1 in "Unique ID"


    I'm beginning to think there may be a problem with the condition itself, as I've done a separate event to paste the badguys into the background when they hit that node.

    According to standard object selection rules, the two will NOT paste at the same time. MMF *should* read it this way:

    Select any badguys, for whom node = "Shoot"
    --- Paste those badguys

    ...but for some demented strange reason, it's triggering for all the badguys.

    I'll keep having a go, maybe it's something obvious that I'm missing too, but it seems increasingly likely there's a bug.


    EDIT: On further investigation, I think there's a corruption in your mfa. It's doing several things it shouldn't normally do - it warned me not to delete the badguy, yet there's a 'create badguy' event which should keep him in memory even if I do delete him. When I did delete him, and tried to edit that 'create' action later, MMF did a total close, no errors just pfft! gone.

    EDIT: Yeah, you'll need some new way to control your badguys. I can't find any path conditions that work with individual objects, they always affect every one.

    A simple solution could be, instead of basing it on the node they reach, give them an 'age' in an alterable value, and have it always go up by 1.

    When it reaches, say, 60, they shoot.

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about making my enemy duplicates unique

    Thanks for taking a look Dines. I am using the "UniqueID" alterable value because I thought that was the correct procedure. But being new to MMF2, I am still learning the tools at my disposal. I have no clue how to use the Spread Value command (or what it does). Care to elaborate?

    As for my approach, should it work using the alterable variable method I tried? (I just want to make sure I am not crazy on this...)

    I have also had that crash problem a few times. It is possible that the crashes have corrupted something. *side note: I can't actually get layer scrolling to work in that file, so maybe that is related to the file corruption theory.

    Since I have been learning from trial and error in a lot of cases, it makes me sad to think that some corruption might have made me think my past attempts at doing things might have actually been correct. Oh well, I guess this is all a learning process.

    Mobichan

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about making my enemy duplicates unique

    So, I rebuilt the file from scratch and it seems to be displaying other problems, even thought the code is identical. I installed the Updater for Extensions this morning and a few extensions. Is it possible this has corrupted my copy of MMF2? I am getting very frustrated now as I feel like the program in unstable.

    Mobichan

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about making my enemy duplicates unique

    Have you installed all the patches to MMF2? It should be ok in that case.

    Try uninstalling and reinstalling MMF?

    As for spread value, here are some articles I've either written or contributed to which should help Spread val is awesome! It basically assigns a unique ID number to each copy of the same object, so you can set them apart.


    http://www.create-games.com/article.asp?id=1798

    http://www.mmfwiki.erathean.com/index.php/Spread_Value

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about making my enemy duplicates unique

    Dines, those articles are just what I needed. Thanks so much.

    I am curious about one thing though. Your article mentions the following:

    "But suppose we draw a line halfway down the screen (at a position of, say, 320px), having some enemies on the left and some on the right. And we do this:

    - ENEMY's X Pos is greater than '320'
    --- Spread '1' in ID of Enemy

    The result is that all enemies on the LEFT will have an ID value of 0. But the ones on the RIGHT will have ID numbers going through 1, 2, 3, 4, 5, etc."
    What would happen to the enemies on the LEFT if you spread a value of 0? Would they all return 0 on the left and one of the enemies on the RIGHT would also return a value of 0? Presumably, the enemies on the RIGHT would be seeded as 0,1,2,3,4, etc? Does this possibly cause the enemy that met the condition who is assigned 0 to behave incorrectly?

    Thanks for being so helpful,

    Mobichan

    PS. I would suggest that alot of these "articles" be compiled into the tutorial section for people looking to get more out of MMF2. I am slowly finding them through forum chatting and google searching, but I could gain ground quicker if they were in one place. Or am I just missing some obvious place on the web? :blush:

  7. #7
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about making my enemy duplicates unique

    Does this possibly cause the enemy that met the condition who is assigned 0 to behave incorrectly?
    Yes, precisely. You'd have one object on the right (the id 0 one) treated as though it were on the left. That's why spreading 1 is such a helpful option. It can give you this logical situation:

    "if a spread value numbers from 1 upwards, an object with a value of 0 cannot possibly have been spreaded"

    One good example is spreading a value of 1 on all objects at the start. If a new object is created, it can be selected as different from the others because it'll have an id of 0.

    Then you can run a trigger (like a fastloop set to run just once) to re-spread all the objects again. This time, it'll include any new objects.


    It's annoying that there's no one place to look for articles, I agree, but there are about three common ones. I find they're normally enough.

    - Here, the CTForum, which has an articles and examples section. Also, you can search here. Being the official forum, and well-moderated, there's YEARS of high-quality content on here.

    - www.create-games.com, the articles section is searchable and has loads, though some are less relevant than others (not so carefully moderated).

    - The Click Wiki - http://www.mmfwiki.erathean.com/index.php/Main_Page
    It has some good stuff, but it's quite new. Good if you want definitions of features. A few of my articles are on there too.

  8. #8
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Question about making my enemy duplicates unique

    Considering duplicate enemies that behave independently, this example might be interesting too.

Similar Threads

  1. Enemy Question
    By CADMAN in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 27th April 2010, 05:38 AM
  2. Question about enemy AI
    By gamemaster in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th January 2009, 09:58 PM
  3. Question about Enemy AI
    By gamemaster in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 12th November 2008, 01:29 AM
  4. Making unchanging enemy id's
    By LazyCoder in forum File Archive
    Replies: 4
    Last Post: 24th September 2006, 05:36 AM
  5. Making an enemy drop-rate
    By Mantoid in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th August 2006, 05:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •