User Tag List

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

Thread: Could we get Object was just created/Object was just destroyed events?

  1. #1
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Darkhog's Avatar
    Join Date
    Jan 2009
    Location
    /dev/null
    Posts
    489
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Could we get Object was just created/Object was just destroyed events?

    They'd would be triggered upon certain object's creation/destruction. Would be usable if you need something to be done after certain object is created/destroyed such as initialization of its AVs/strings or making a cool effect and the object in question can be destroyed/created in various places in the code. Would help the maintainability of the code since you wouldn't have to copy-paste the init code in all the places object can get created/destroyed. Basically, the DRY principle.

  2. #2
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    defisym's Avatar
    Join Date
    Jun 2017
    Location
    Asia
    Posts
    536
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Use the animation condition, Fusion will play appear & disappear when creating & destroying, so check animation state is one solution.

  3. #3
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Darkhog's Avatar
    Join Date
    Jan 2009
    Location
    /dev/null
    Posts
    489
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    What if object doesn't have those? Also making dummy ones would not always be wanted as you can't make animation frame completely empty (for whatever reason) and if you just copy one of the existing frames, the character would just snap to that animation upon creation/destruction (a visual glitch).

    Seriously, I have had enough hacks, I want proper solutions.

  4. #4
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,445
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    You actually can make a completely empty frame if you use alpha channel mode.

  5. #5
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    defisym's Avatar
    Join Date
    Jun 2017
    Location
    Asia
    Posts
    536
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Darkhog View Post
    What if object doesn't have those? Also making dummy ones would not always be wanted as you can't make animation frame completely empty (for whatever reason) and if you just copy one of the existing frames, the character would just snap to that animation upon creation/destruction (a visual glitch).

    Seriously, I have had enough hacks, I want proper solutions.
    Maintain a copy of object list then compare the difference in handle object routine, and trigger immediate events for new add ones and the one with destroy flag. The proper way needs to be done in extension level, or you need a flag to track if object been initialized by a always loop with flag condition.

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)
    Linky's Avatar
    Join Date
    Mar 2020
    Location
    Egypt
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Darkhog View Post
    What if object doesn't have those? Also making dummy ones would not always be wanted as you can't make animation frame completely empty (for whatever reason) and if you just copy one of the existing frames, the character would just snap to that animation upon creation/destruction (a visual glitch).

    Seriously, I have had enough hacks, I want proper solutions.
    It doesn't need to be completely empty tho, I mean yeah you can use alpha but why in the first place
    If you don't want it to display the destruction animation, you can immediately change to any other animation sequence (like stopped) in the same event you check if the animation sequence playing is the Disappearing one (that will make it instantly destroy the object while still triggering the actions you want to trigger)

    You basically do the same thing for Creation (but with the appearing animation), but you can also just create a flag, call it "Present" or something like that, leave it unchecked, and in events if flag "Present" is off ---> do what you want THEN set the flag on (I use this method a lot actually)

    The downside of these workarounds are that they are not immediate, so you would have to take event order into consideration here, but you can still call a fastloop as a check in the same events you destroy objects in, and on this loop you check if the object has the disappearing animation (but yeah it kind of defeats the whole purpose I know)

  7. #7
    Clicker Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Darkhog's Avatar
    Join Date
    Jan 2009
    Location
    /dev/null
    Posts
    489
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Ok, let's me rephrase that.

    I want proper solutions on the engine level. What you are proposing are hacks/workarounds (and CF shouldn't even have "special" animations in the first place).

  8. #8
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,445
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Err, does any other engine have these functions tho?

    Edit: okay, seems like it exists in some... Idk, it would be useful to have On created/On destroyed conditions...

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)
    Linky's Avatar
    Join Date
    Mar 2020
    Location
    Egypt
    Posts
    258
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Darkhog View Post
    I want proper solutions on the engine level.
    Well that means new conditions for such, only Yves knows if they are easy to add...
    But just guessing, if they were easy to implement, then they would have been there long time ago, as I saw a lot of users requesting it before and it never existed
    But yeah immediate conditions for those would generally be very cool, maybe in F3 if it never comes to 2.5

    Quote Originally Posted by Darkhog View Post
    (and CF shouldn't even have "special" animations in the first place).
    Well they are actually a feature, they are related to the built-in movements so they can switch animations automatically based on the movement state, you know to make thing easier when working with said movements.
    and honestly the disappearing and appearing animations can be pretty useful, as say you wouldn't need to set up a destroy buffer so you can only actually delete the object after the destruction animation finishes, that's not needed because the disappearing animation does it automatically.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Jun 2014
    Posts
    116
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Linky's solution is good approach. I wouldn't consider it to be a "hack" to have to manually keep track of your instance creation.

    Although it would be nice to have a text condition for it you can just select, you effectively already have this using the Appearing/Disappearing animations, that you can still evaluate against. And as naitor says, it would likely be equally as "hacky" doing the same in most other game engines, and pretty much every programming language.

    What you want to do in terms of keeping track of object creation is not a trivial task, and as such it's probably reasonable to expect that the heavy-lifting for such logic should lay largely on the programmers side.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 29th September 2019, 06:45 PM
  2. Replies: 12
    Last Post: 23rd December 2016, 10:27 AM
  3. [BUG] Create object if flag is off, and assign something to the created object
    By Popcorn in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th January 2013, 12:01 AM
  4. Assign random created object to another created object
    By wizlore in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th November 2011, 12:53 PM
  5. Create object at same position of object destroyed
    By The Thinker in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 6th November 2006, 01:16 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
  •