I'm trying to figure out how to grab data like variables from components on other objects. I've been using component reference in my code but when I try to get a variable it comes out NaN. Does anybody maybe know why? Here's the code I'm using so far: function signal(name, value){ if(value == true){ let collision = this.entity().component('If Collide - Pillar'); let collObject = collision.collisionObject(); let pillar = collObject.component('Pillar Life'); let jump = this.entity().component('Jump'); if(pillar._life > 1){ collObject._life -= 1; collObject.setPosition(collObject.position().x, collObject.position().y - 1, collObject.position().z); } else { jump._stop = true; pillar._life -= 1; collObject.setPosition(collObject.position().x, collObject.position().y - 1, collObject.position().z); this.emitSignal('Jump', true); } } } if anybody has any ideas that would be most helpful.
This might give you some insights: https://www.buildbox.com/forum/index.php?threads/globalvars-manager.14482/
I tried downloading and opening the asset file, but BuildBox tells me it's an Unrecognizable format. Do I need to update BuildBox 3 maybe?