[help] Weird Behavior When Creating Object (programatically) From Another Object

Discussion in 'Buildbox 3.0' started by nyamuk91, Dec 30, 2018.

  1. nyamuk91

    nyamuk91 Boxer

    Joined:
    Aug 15, 2018
    Messages:
    95
    Likes Received:
    20
    I'm trying to solve an issue involving creating few objects (Object A) when another object (Object B) is created. I modified the code from "Spawn" node but it didn't work as I expected. Since I want to create Object A when Object B is created, I put the object creation code block in Object B's init function but nothing is created. Pic: https://i.imgur.com/1IAoZuE.jpg

    However, when I put the same code into the update function, it works!. But I felt like it's not clean to do it like this. Pic: https://i.imgur.com/WCSZFTY.jpg

    So my question is, why it behaves like this? Why the result is different even though it essentially doing the same thing? Does it require continuous function call?

    One weird thing to note, in the first image, there's shadows of Object A, but the objects are not there. Did I do anything wrong or is this a bug?
     

    Attached Files:

    Last edited: Dec 30, 2018

Share This Page