User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: How to make use of spread values?

  1. #1
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to make use of spread values?

    Hi.

    I spawn a number of enemies + their collisionboxes.

    Now if i want to kill an enemy it kills ALL collisionboxes.

    * on whateverkillsthem

    -> destroy enemy, destroy collisionbox

    I used then spreadvalues and tested them this way: User clicks on object (enemy or collisionbox) set counter to alterable value B. And it's working so far, every enemy has the same value B as their collisionbox.

    So i thought i do this:

    * on whateverkillsthem
    + Alterable Value B of Enemy = Alterable Value B of Collisionbox

    -> destroy enemy, destroy collisionbox

    But that doesnt destroy anything at all.

    So either i can destroy one enemy and all collisionboxes or nothing at all....

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Pineapple's Avatar
    Join Date
    Oct 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try: Value B of collision box = value B of enemy.

  3. #3
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried that, didn't work.

  4. #4
    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)
    I think i see what your problem is Bulb
    The problem lies in one of your conditions
    The condition wich is problematic is the " * on whateverkillsthem " condition

    Describe the " * on whateverkillsthem " condition

  5. #5
    No Products Registered

    Join Date
    Feb 2012
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't think it's the condition....

    The kill condition was alterable value c (energy) = 0
    I tried several other conditions to test it like, overlapping, etc

    Another condition is movement, the enemies and the collisionboxes move different ways now.

    I really need to tie these objects together.

    I double checked everything.... every value, condition etc. for typos or other errors.

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Pineapple's Avatar
    Join Date
    Oct 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please post an example .mfa of your code.

  7. #7
    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)
    If your objects and collision masks are moving apart, there is something very wrong.
    ...
    Here is how you can do it:

    The Collision Mask Object is the only object that should move, while the Visual Enemy Objects should just reposition on the Collision Mask Object, like this:

    Allways
    --> Visual Enemy set position to Collision Mask

    By doing the above conditon, each seperate instance of Visual Enemy will now find and reposition to a 'different' Collision Mask and be able to read that 'specific' Collision Masks Alterable Values, Flags etc, like this:

    Allways
    --> Visual Enemy set position to Collision Mask
    --> 'Enemy' set MaskMovementSpeed_ to 'Collision Mask' MovementSpeed_

    If we now, after doing the above condition, make an opposite Condition like this:

    --> Collision Mask set position to Visual Enemy
    --> 'Collision Mask' set EnemyEnergy_ to 'Visual Enemy' Energy_

    the Collision Masks now knows the Energy_ values of the 'specific' Visual Enemy wich is attached to the Collision Mask. This makes it easy to destroy pairs of Enemy and Masks, like ths:

    If Visual Enemy Energy_ = 0
    --> Destroy Visual Enemy

    If Collision Mask EnemyEnergy_ = 0
    --> Destroy Collision Mask

  8. #8
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think you have to make use of the ForEach object or a fastloop for this particular instance.

  9. #9
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jan 2010
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't really need the ForEach object, but it does come in handy.
    But for me, I would use just loops.
    The thing is, instead of setting an ID to the hitbox and the enemies and then comparing the values, you instead run a loop and then compare both IDs to the index of that loop.

    I made an example

    Edit: Oh, I noticed you might need to position the enemies to the hitboxes instead of the hitboxes to the enemies. I made a second example for that aswell

  10. #10
    Clicker Fusion 2.5 DeveloperMac Export ModuleSWF Export Module

    Join Date
    Jan 2009
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Isn't this what you want?
    (I altered Yikes' example)

    Instead of:

    "Player collides with Enemy"
    It should be
    "Player collides with Collision Box"

    and

    "ID of Collision Box = ID of Enemy"
    Should be
    "ID of Enemy = ID of Collision Box"

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Bug? spread values
    By Pineapple in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 18th January 2012, 08:47 PM
  2. I can't spread values properly
    By EdibleWare in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 18th January 2012, 06:54 PM
  3. How are spread values spread ?
    By rudy in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 6th December 2011, 08:15 PM
  4. Spread Values Enemy Gravity?
    By ChrisBurrows in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 8th November 2011, 12:36 PM
  5. Spread Values-- can't get it to work!!!
    By alxmrg in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 3rd February 2009, 09:45 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
  •