User Tag List

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

Thread: Instances to attack each other?

  1. #11
    Clicker 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)

    Join Date
    Jan 2016
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a while since this post wast last active, so I don't know if anyone will see it now, schrodinger or anyone.

    The code above has been really useful... but: Can I add a part, which could allow this "instance vs instance attack" with minions with "consume"- type attack to kill another instance and to create a corpse, which will be glued to the consuming minions, following it until the corpse's timer runs out and the corpse destroys itself?

    It is a decorative matter, so it's not impossible to leave out, but it would look really good. I have made corpses to follow a minion with consume ability, but I'd need the attack itself to work before that, creating the right kind of corpse to follow the right attacker. Otherwise they will spawn on wrong minion and look stupid, "jumping" from one place to another when the minion dies and the corpse gets spawned on another attacker far from the one actually killing the consumed minion.

    My English has not improved a lot since the last time. Sorry for that, and for the complicated post about the problem.

  2. #12
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Hey, I just logged , but not sure I got the request,
    could you explain step-by-step?

    "instance vs instance attack" with minions with "consume"- type attack to kill another instance
    so far nothing new from what you already have - right?
    It's a different "type" that behaves a bit differently, by creating a "corpse"?

    and to create a corpse, which will be glued to the consuming minions,
    "corpse" would be an additional object, without any attacking behavior, just a graphical touch?

    following it until the corpse's timer runs out and the corpse destroys itself?
    if it is an additional object, you could just use one of its values as a timer and track down those > max_time_allowed

  3. #13
    Clicker 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)

    Join Date
    Jan 2016
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow... fast...

    Thanks already, even if it turns out to be impossible.

    So:

    Step 1: The code already there: the loop, which makes the collision detector to visit every instance(minion) and sets the damage of the detector. It deals damage to any instance, which overlaps it and is not the attacking instance itself nor a team mate of the attacking instance. (I think you already know this step, har har.)

    Step 2: I have a minion type, which attacks another instances not by just damaging them, but by consuming them. The consume part is not a problem, since I can just make the detector to cause damage equal to the health + 1 of the instance being attacked or to just make the damage count of the consuming minion so high that nothing can survive it.

    Step 3: I'd like to make the minion consuming the other instance to gain a corpse, which will follow the instance until the corpse dies by counter and destroys itself. The corpse looks transparent and looks really good and also indicate that a consume attack has been made.

    The problem is step 3. How in the name of ... I can make the code, the attack with the collision detector, to

    1. Kill the minion under attack
    2. To make the minion attacking to create a right kind of corpse for itself (or to make the dying minion to create a corpse of itself on top of the right attacker)
    3. The corpse to lock on or glue to the right minion, until it dies

    I have been able to just use values to make the corpse follow the consumer minion. I can use values to make the detector to attack minions with consume (instant kill attack) and not just do damage. I can even use strings of the minions to lure the right kind of corpse to be spawned.

    But even to save my life, I can't make all those parts to work together. Dying minions "jump" onto another attacker. All minions follow the same consuming attacker. The minion attacking with consume ends up attacking itself...

    And I know: I could just animate the minion with all the different corpses, but that would mean every minion type with every kind of corpses and be so much trouble, that it might not be worth it. Also, I can't change anything after that, since any new change would mean new animations and would not let the consume attack to be bug fixed easily, if needed. If I could make it work as a part of the attack code already there, it could actually work. Maybe I just don't make right choices with my values and strings I use, or it is impossible altogether...

    EDIT: I still hate that I can't make shorter posts about my problems. I sound like a whiny child or something like that...

  4. #14
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    I think it's definitely possible (very few things are not possible in Fusion! )
    if I understand correctly:

    1- your consuming minion kills someone other >> a corpse is created and "linked" to the minion
    (you can just create a "corpse" object, set its animation to the correct type it represents (attacked_type),
    set one of its values ("my_minion") to fixed_value of the attacking minion or whatever ID you may be assigning to them,
    to create a reference to the parent object - you should have the "attacker" minion data stored in the detector I guess?
    When you create an object, all following actions in the same condition will refer to that object, so all values you will set will refer to that specific corpse instance you are creating)

    2 - corpses follow the minions >> you fire a separate loop on corpses objects, and make them stick to their parent
    (
    on each one of "corpse", loop name "follow"
    +fixed value(minion) = my_minion(corpse)
    >>> look at 0,0 from minion
    )

    3 - corpses expiration is rather easy - you simply initialize their "lifetime" value in the frame editor to whatever number you want (at 60 FPS would be 60x seconds of lifetime)

    always >>> sub 1 from lifetime(corpse)

    lifetime(corpse) <= 0
    >>> destroy


    Drawback:
    the additional loop on (2) will add to the bulk of an already (probably) "resource expensive" code
    don't know how many corpses you will handle..?

  5. #15
    Clicker 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)

    Join Date
    Jan 2016
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I may be able to do something about the corpse loop part. Maybe a value or something to make it so, that when it has two corpses already on it and it attacks, it kills one of the earlier ones to "digest" room for the new one.

    Thank you so much for the response. I will start testing your idea right away. I read the code and I really thing you got what I meant and the code looks like it will work.

  6. #16
    Clicker 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)

    Join Date
    Jan 2016
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why in the name of all that is holy I didn't ask you right away. I know there is still a chance that some bugs may occur, if too many minions attack each other at the same time... But it works! I have minions with consume-attack and corpses realize which parent minion to follow. They even choose the proper corpse type.

    Thank you, again.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Replies: 3
    Last Post: 18th May 2015, 07:16 PM
  2. Comet Attack!
    By Mostafa in forum iOS Released Games & Apps
    Replies: 0
    Last Post: 14th February 2014, 08:34 PM
  3. attack on sight?
    By delta9857 in forum The Games Factory 2 - Technical Support
    Replies: 6
    Last Post: 3rd December 2009, 08:53 PM
  4. Making a character attack?
    By delta9857 in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 8th November 2009, 03:57 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
  •