User Tag List

Results 1 to 3 of 3

Thread: Groups, flags, variables: I´m stuck, please help

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)

    Join Date
    Sep 2007
    Location
    Austria
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Groups, flags, variables: I´m stuck, please help

    I am confused because of all the events in my game. I don´t know how to code a simple condition.

    There are different kind of monsters. They all belong to the group "baddies".

    1) When the player collides with a monster all monsters should stop. The player should lose 1 life and a hit-animation is played.

    2) When this animation is over the player is moved to a starting point...can continue playing...and all monsters should start again. No, not all monsters. The exception is a trapped monster!

    3) When the player shoots a ball and a monster gets hit, the monster is trapped. It stops, cannot move anymore and its animation changes to "trapped". After a certain amount of time it destroys the trap and runs around again.

    =========

    I know how to get this to work but it is too complicated. The code is not clean but too many events would be needed.

    Normally, I would go for: group baddies collides with player => player´s flag is set to something...if the flag is set to it, group baddies stop moving. When the player has respawned all baddies continue moving.

    This is easy.

    The tricky part is the trap. If I use "group baddies collides with trap => change animation to trapped" it works. But the player should not lose 1 life if he hits a trapped monster. If I use "group baddies collides with player and animation trapped is not playing" the player is still hit because there are members of the group baddies that do not have this animation running (only one member has it).

    I cannot use groups with that trap-thing but without groups it is too complicated.

    I do not want to go for "if monster1 collides with player and animation trapped does not play" and "monster1 collides with trap". I have 7 monsters so far and would need 7 x 2 events for a rather simple action.

    I want to reduce the number of events with groups but how?

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)

    Join Date
    Sep 2007
    Location
    Austria
    Posts
    289
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Groups, flags, variables: I´m stuck, please help

    I have different monsters...and the player should be able to trap, nuke etc. each of them...with different animations.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,366
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Groups, flags, variables: I´m stuck, please help

    Strange. Replacing collides with overlapping seems to help though..

Similar Threads

  1. Understanding variables/flags?
    By Thrawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th January 2011, 04:40 PM
  2. Flags
    By Angelfox in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th January 2009, 04:48 PM
  3. Using flags for my UI
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th April 2008, 09:55 PM
  4. Very new to this - need help with flags/variables
    By beannie in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 14th October 2007, 11:37 AM
  5. Flags
    By konjak in forum Multimedia Fusion 2 - Technical Support
    Replies: 55
    Last Post: 2nd July 2006, 02:53 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
  •