User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15

Thread: Some advice...

  1. #11
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Some advice...

    Found it.

    Event lines 14 and 15. These are the events when you are setting movement details of the bats using the MoveIt object. Took me a while to spot this because I've never used the object and don't know anything about it. Anyway, it seems the problem is that you are trying to set the bat details to the object but there are no bats at that point which is why it's crashing.
    If you add a condition to both events that there is more than 0 bats, then it won't crash anymore.

    Code:
     * SpawnCount of EnemySpawner = 1
     + Number Of (Bat) > 0
     = Actions
    Your only problem now is that after the first bat the others don't move. You might want to have a look at how the moveIt works just to check that you've done that ok. Either that or switch to an easier movement (the values you've had to use seem to me to be a bit overkill for the sort of movement you're actually doing).



  2. #12
    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: Some advice...

    Another step closer:
    counter in the spawner implemented

    I can get the enemies to spawn every X seconds now from the spawner, but it only works if I use the SpawnTimer value as the condition for cueing and activating the MoveIt extension (which needs 2 separate condition lines to work properly). I really wanted to use the SpawnCount as my condition, but that seems to yield odd results (though I don't know why). Unfortunately, by using the SpawnTimer as my condition, I can only get things to work if the enemies spawn at the same intervals.

    Also, now I am trying to figure out how to make the spawners unique as well. I spread a value in the spawner ID, but it doesn't seem to make a difference. I wanted to use the spawners to calculate the vectors that the enemies would travel along, but they seem to use the original spawner (which I plan to keep offscreen) to get the position values. This results in my enemies flying offscreen toward the original spawner object. Any idea how I could I can accomplish this? If you run the file you can see an example of this happening.

    The last issue I am running into is the fact that I made my enemy actions with conditions such that the EnemyType should be set to a specific value to get specific events to run. But it seems that if I set my starting value to a higher EnemyType (for instance, 2) then the lines that had the condition of "If EnemyType = 1" seem to also run. This seems completely against the idea of conditions.

    If anyone can offer some suggestions for dealing with these issues, I would appreciate it. And many thanks to TreeHugger for helping me get this far. ^_^

    Mobichan

    EDIT - Thanks TreeHugger! MoveIt seemed like a good place to start in making simple path movements, but maybe there is a better way to do it. I am using a bunch of formulas to calculate the normalized vector of the enemy's path so they will continue on the same heading and offscreen. Is there a simpler way to do this?

  3. #13
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Some advice...

    Unfortunately, by using the SpawnTimer as my condition, I can only get things to work if the enemies spawn at the same intervals.
    Not necessarily. When the spawn timer reaches 0 and you spawn an enemy, you could reset the spawntimer to a random value but also in the same event switch a flag on in the spawner (say flag 0). Then in the next two events rather than saying spawntimer is 50, you can say
    * Flag 0 is On
    = Do Actions

    and then in the second events (which has the same conditions) you turn the flag back off so it's ready for the next spawn. That way you can have enemies that spawn at random intervals.

    I spread a value in the spawner ID, but it doesn't seem to make a difference
    Spreading the value won't do anything unless you then use that value in a condition. It's often used to identify individual object during fast loops. Look at the example I sent you and check out the loop. There are events there which start 'On Loop' and give the name of the loop and then the next condition compares the ID of an object to the Loop index. As the values are spread, only one object could have that value and so the actions processed in that event, for that loop, only apply to that object. That's how to use the spread values and get objects to do different things

    I wanted to use the spawners to calculate the vectors that the enemies would travel along, but they seem to use the original spawner (which I plan to keep offscreen) to get the position values. This results in my enemies flying offscreen toward the original spawner object
    This happens for the same reason as above. you'd need to loop through and identify which ones your talking about. I don't think it would really work with the code you've done anyway.
    Not sure why you want to use the spawners to calculate the vectors? The bats only start there and once they move those values would no longer be correct. Why not calculate them from the individual bat to the player?

    But it seems that if I set my starting value to a higher EnemyType (for instance, 2) then the lines that had the condition of "If EnemyType = 1" seem to also run. This seems completely against the idea of conditions.
    I'm assuming what you mean here is that all the bats do the same thing even though you reference the spawners enemy type. Again, have a look at the example I sent you. In that, when an enemy was created it also takes the enemy type of the spawner. Then when you want bats from a certain type of spawner to do things, you reference the bats type NOT the spawner. The reason for this is when you do the conditions you are selecting object to perform the action on. When you select the spawners enemy type, say type 2, it looks at just those spawners but because you haven't mentioned anything about the bats in the conditions, all bats are selected when you say Bats do this or that.

    Ok er that was a long one. Try some of those and see how you get on

  4. #14
    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: Some advice...

    IT WORKS!!! Yay TreeHugger (and me)! :blush: Thanks so much for all your help and patience. I am going to try playing with another fastloop to work out a bullet patterns once I get a small collection of movements. Your sample file really helped me alot.

    Mobichan.

  5. #15
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Some advice...

    Glad it's all working now. Good luck with the game

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Need a bit of help/advice
    By viperek in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 20th March 2010, 08:07 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
  •