Spawn An Object With Javascript

Discussion in 'How Can I...?' started by lqhf, May 2, 2022.

  1. lqhf

    lqhf Boxer

    Joined:
    Mar 24, 2016
    Messages:
    2
    Likes Received:
    0
    Hi guys! I don't know much about javascript, so my questions may seem a bit (or very) naive... ;)
    Is it possible to spawn an object with code instead of choosing the asset manually with the Asset Manager in the attributes panel?

    I would like to change the Code of the Spawn-Node (line 13) and define "asset" directly by choosing the name of the object:
    Code:
    let asset = this.attribute('Asset');
     
  2. Nicki

    Nicki Boxer

    Joined:
    Feb 26, 2020
    Messages:
    9
    Likes Received:
    9
    Hi there.
    Yes you can easily do that.
    Please find attached a new spawn node you can just drag and drop it into your asset.
     

    Attached Files:

  3. lqhf

    lqhf Boxer

    Joined:
    Mar 24, 2016
    Messages:
    2
    Likes Received:
    0
    Thanks a lot Nicki!
    Exactly was I was looking for!
     

Share This Page