Buildbox 3d Api Documentation

Discussion in 'Buildbox 3.0' started by PLASSA, Sep 8, 2018.

  1. PLASSA

    PLASSA Boxer

    Joined:
    Jun 5, 2018
    Messages:
    24
    Likes Received:
    6
  2. PLASSA

    PLASSA Boxer

    Joined:
    Jun 5, 2018
    Messages:
    24
    Likes Received:
    6
  3. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
  4. DanFarfan

    DanFarfan Avid Boxer

    Joined:
    Sep 22, 2018
    Messages:
    101
    Likes Received:
    42
  5. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    Thanks. I noticed on the discord, mention of updated docs with beta 4. For now it's a lot of trial and error :) (and crashes)
     
  6. isac cabrera

    isac cabrera Boxer

    Joined:
    Nov 8, 2018
    Messages:
    50
    Likes Received:
    8
    Hi guys!! i was trying to find a component script about the score point but not the addScorePoint, because what i would like to do is to increase my character's move velocity while my score points hit a determined amount, i am not an avid programmer so i am struggling with it, but can you explane me if this is possible and how can i do it?
     
  7. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    You need to use the getScore(type, coinorpoint ) function. Enter the parameters best, world, session plus point or coin to get the score you need.....oops that was in a dream last night, it doesn't really exist...yet. ;-) Sorry just a little sick humor. Hopefully this will be in b4. A node/JS is definitely needed to do that. They did a lot of work on the UI I think, so I'm hoping it's there or added to the JS..
     
    ZackGriset likes this.
  8. isac cabrera

    isac cabrera Boxer

    Joined:
    Nov 8, 2018
    Messages:
    50
    Likes Received:
    8
    Jajaja you really gave me hope before you said it was a joke!!..
     
  9. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    Sorry, I couldn't resist.....and it's not in b4 either....but because you can communicate with the UI now from the 3D World, there's no reason you can't track the score yourself and pass it to the UI, or take action on it. You can also save any values you track with the new Settings component so it should be possible to create a complete scoring module.
     
  10. isac cabrera

    isac cabrera Boxer

    Joined:
    Nov 8, 2018
    Messages:
    50
    Likes Received:
    8
    Ok that sounds great!!!, by the way, as I can see you are an avid boxer so you could help me, i have a little problem in a game I am buildboxing!, i putted a sound to some objects that when collide with the actor it obviously is activated but it is truncated when the object disappear, i would like that the sound keeps sounding even if the object disappears, how is this possible?
     
  11. LBPToo

    LBPToo Avid Boxer

    Joined:
    Nov 1, 2016
    Messages:
    233
    Likes Received:
    141
    I assume you mean keep playing until the sound completes. I started to write a description on what to do and figured that it would take about the same time to do a bbasset that has it done for you. When the object is "defeated", there needs to be a new modified defeat node, I've called "Hide Object", where this node makes the object invisible, then a timer node runs off of that node and needs to be set to enough time to let the sound complete playing(you'll need to experiment with this), then when the times up it goes to a normal defeat node and that's it. bbasset enclosed with it setup to do what you want. I did not test it but it should work. You will need to set the if collide to whatever your character is, add the sound to the sound node and experiment with the timer to get the time you need for the sound to complete.

    UPDATE!!!!! I had to change the defeat node to have "remove()" in it instead of just setting start to false or the object wasn't really going away, it was just invisible.....in my opinion this should be the default in the defeat node. I have changed it everywhere in my code.

    Note:
    This will only work in Beta 4 and above.
    Super IMPORTANT: in the 3D Model node you must set the Material to Shadeless Transparent for this to work.
    NOTE: It's tested and I have it working correctly now.

    NEW file 12/3/18 7:30 AM MT
     

    Attached Files:

    Last edited: Dec 3, 2018
    Christoph likes this.
  12. hybrid.gl

    hybrid.gl Boxer

    Joined:
    Aug 29, 2018
    Messages:
    12
    Likes Received:
    3
    To resolve my "keep the sound problem", i come up with something simple.

    Just add a cube from the assets, remove the 3d model to make it invisible and add the sound (node to start)
    and spawn this cube (the one with the sound) from the object which will be collided
     
    Jollydo likes this.
  13. Jollydo

    Jollydo Boxer

    Joined:
    Aug 21, 2017
    Messages:
    89
    Likes Received:
    38
    Thanks @hybrid.gl awesome solution to get a "longer" sound to get played completely, at a collide (bounce, hit).
     

Share This Page