I need parenting advice

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Now that you clicked this thread, you may just as well help me, eh?

    So! I have two objects, one is a fire bullet and the other is the light for this object (using add effect). I create it like this:

    Code
    + WeaponID of bunnyPMO = 1
         New Objects : Create Scorcher at X=XActionPoint( "Bunny Gun" ), Y=YActionPoint( "Bunny Gun" ), Layer=Layer( "Bunny Gun" )
         New Objects : Create Scorcher Light at X=X( "Scorcher" ), Y=Y( "Scorcher" ), Layer=3
        Scorcher Light : Set parent to Fixed( "Scorcher" )
        Scorcher : Set child to Fixed( "Scorcher Light" )

    And then I try to update the positions like this (loop is created in the Always event:

    Code
    * On each one of Scorcher Light, loop name "Scorcher Light Update"
    + parent of Scorcher Light = Fixed( "Scorcher" )
    + child of Scorcher = Fixed( "Scorcher Light" )
        Scorcher Light : Set X position to X( "Scorcher" )
        Scorcher Light : Set Y position to Y( "Scorcher" )

    Unfortunately if I try to fire another bullet before the first is destroyed, the light gunk stays on the screen, frozen in the air.

    There are no impossible things, there is only lack of skill needed to complete the task.

  • I think the second condition (parent of scorcher light = fixed(scorcher)) is unnecessary. Try deleting it - does that improve anything?

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Don't worry about setting IDs for positioning objects?

    Fusion automatically "pairs" objects when they are created together.
    WeaponID = 1
    Create scorcher light
    Create scorcher

    Always
    Position scorcher light at scorcher

    Now instead of worrying about destroying them do this:

    Scorcher collides with object
    - position scorcher at -50 -50

    Now you can either position a dummy object at -50,-50 and destroy scorcher and scorcher light when there is overlap or you can just do like this:

    Scorcher x < -40
    + Scorcher y < -40
    Destroy

    Do the same for scorcher light

    Easy solution and no need to track IDs.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!