Hi boxers! I´m (unfortunately ) making a kind of complicated RPG-game. Is it possible to spawn an object that will be activated in one world, and than it spawns up in the next world? Let me clarify: If the character collects a key in world one - can I make a secret chest emerge in world 2? I have already tried send-recieve-spawn, but so far it only works inside the respective world.
Have you tried using true/false with the triggers? You might also need to use the save variables in the new world to store that true data. Its not something I have done, but try asking in the discord channel. Lots more help there
Yes you can do it .u need to do little coding for that and that is very easy. All you have to do is when you collect a key. You need to store a variable with data in setting class and then make a condition which checks if you have a variable in setting class then you can enable the chest in world 2
Check api documentation for setting class. https://www.buildbox.com/help/buildbox-3-api-reference/settings/ 2nd lets for example you can store a bool variable to true in setting class then check if settings contain that variable and its true then trigger your custom function. I will create a simple node for you dont worry. You can store many types of data in setting class
Hi Everyone Download Keys System from Below. https://rb.gy/rhbkin You can create and store unlimited Unique Keys. Watch the tutorial Video Included. Logic Detail : If you Collide with Key object it will going to store a key With Key Name and key value in Setting Class and key object will get remove. Key Checker object have Key check Script Attach. It will Check for Same Key Name and value which were saved previously. If we have collected the same key which is defined in the script then object will become visible. else it wont be visible. Also there is Remove Key Script Attach in case you want to delete the key from setting Class. Just Enter Same Key Name and tick Remove Key option. Thanks
Thank you for this. I think this is how the Buildbox folks intended the “save variable” and “load variable” to work. They should drop there versions of the nodes and use yours (slightly modified) in the product.
I think we should have assetstore for custom bb nodes. So we can download and try custom bb nodes within the software. Also If they can bring intellisense in the code editor that will be a great help for creating custom nodes.
There seems to be an issue with the functionality of the nodes. When my character is defeated in a level, somehow it is triggering an additional key. I checked the names and values, and they are all correct. Any thoughts?
Can you share your bbdoc. Actually u need to connect script with object not character if character collide with lets say key it will then store key. on the other hand u need to check for a key. Depends upon your game u may need to create a different logic. U can send me your bbdoc and i will look for the issue
I believe found what I did wrong. It wasn’t with your code. I had a “variable save” and “variable load” nodes still in the node map. I removed them and it now seems to be working. Thank you again for your great work!
@Elite Games I tried to modify your key system to trigger a position animation node witch I connected to the "Check Key" node. It works the first time, but does not persist. I did this to create a level selection that is more interactive then just pressing a button on a UI. If I can get it working, I believe it will be pretty cool. Anyway, I am going to put the code below and would appreciate if you could figure out why the animation doesn't happen each time the user enters the level selection world (not just the first time). If the key is stored in settings, then when the "check for key" script occurs, it is supposed to trigger the animation but for some reason only does it immediately after the corresponding key is saved. Here is the code: For Key storage: _____________________________________________________________________ var keyName; var KeyValue; function init(){ keyName=this.attribute("Key Name"); KeyValue=this.attribute("Key Value"); if (Settings.Keys == undefined) { Settings.Keys = new Object(); } } function start(){ } function update(dt){ } function signal(name, value, sender){ if(name=="in"&& value) { Settings.Keys.keyName=KeyValue; warning("You Stored a Key Object with Name "+ keyName + " and key value is " +Settings.Keys.keyName); this.emitSignal("out",true); } } function requested(name, arg, sender){ return this; } For the check key: _____________________________________________ var keyName; var KeyValue; var CheckKey=false; function init(){ warning("This Script Check If You have a key stored in setting class. If there is a Key then this object will become visible else wont be visible"); if (Settings.Keys == undefined) { Settings.Keys = new Object(); } keyName=this.attribute("Key Name"); KeyValue=this.attribute("Key Value"); } function start(){ //hide this object if we dont have a key this.emitSignal("out",false); } function update(dt){ if(CheckKey) { //check if we have a key stored in setting class if(Settings.Keys.keyName!=null && Settings.Keys.keyName==KeyValue ) { // show this object if we have a key this.emitSignal("out",true); } else { //hide this object if we dont have a key this.emitSignal("out",false); } } } function signal(name, value, sender){ if(name=="in"&& value) { CheckKey=true; } } function requested(name, arg, sender){ return this; }
Can you show me a video what you want or send me your bbdoc and i will look into it for you. check if you are not removing key from setting. If we remove key then false signal will get trigger.
I did not add code (at least I don't think I did) that would remove the key from settings. Here is a link to my google drive folder with a video showing the behavior and the bbdoc: https://drive.google.com/drive/folders/16Thke0KxYfOIKl5uYgk7mcozJnCfg6uq?usp=sharing
Hi thanks for sharing i found the bug with keys system. I will update the keys system and post the new 1 soon.
I will release a temporary solution to your problem. I need some time to work on this also i am busy in couple of other projects that are nearly available for release. I will send you dm soon. Sorry for the delaying issue. The current problem with key system is i thought that we dynamically creatw new keys in settings class. But here we are just replacing key value so when we save other keys they get replaced. I am shifting this to array for current situation but i am having small issue with that and that need to be fixed before release