Here's updated code: var Playsound = pc.createScript('playsound'); // initialize code called once per entity Playsound.prototype.initialize = function() { }; // update code called every frame Playsound.prototype.update = function(dt) { var AudioEntity = this.app.root.findByName('mySound'); if (this.app.keyboard.wasPressed(pc.KEY_P)) { AudioEntity.sound.play('sound-name'); } if (this.app.keyboard.wasPressed(pc.KEY_S)) { AudioEntity.sound.stop('sound-name'); } if (this.app.keyboard.wasPressed(pc.KEY_SPACE)) { AudioEntity.sound.pause('sound-name'); } if (this.app.keyboard.wasPressed(pc.KEY_C)) { AudioEntity.sound.resume('sound-name'); } };
idk what's with my Maya but when I click the checker box nothing happens???? I've been using Maya for like 5 years I don't know why this is happening all of a sudden.
hi my game is 2d platformer but after build i run game into my android device the game is work properly but when i lock my phone by side lock buton and when i again pres the side lock button for unlocking my device mobile is not asking me about my password game is firectly open with i unlock my device and game is playable without unlocking and when i quit or exit a game my phone is locked behind the game so when i exit my device is asking me to unlock the mobile so idk whats the problem and how to resolve this can you help me?
Hey, I've copied your code exactly, but for some reason I'm not seeing the public variable of Score Text and it says "scoring does not exist in this current context" in line 28 where it says scoreText.text = "Score : " + Scoring.totalScore; Do you know why this is?
I did the saeme indicated in the video, and there was a problem of interference between the extrussion. It was like a collision between faces across the curve. Anyone could help me?
Bit late to this, but shouldn't the public variables be serialized private fields? Also shouldn't physics based stuff be in fixedupdate and not update?
Hey great tutorial.... one piece of info I was missing, as I had the intention of creating a part to 3D print - in order to create a part, not a surface (to boolean with other parts to create a whole model to print), you must in the sweep tool, click on SOLID, not SURFACE.... this drove me nuts for a few hours until I noticed another creator playing around with that function. Cheers :)
Thanks for the tutorial! When i go back to the 1st scene, crystals are respawning and when i collect them it just keeps adding to the score. Is there a way to not load them and keep the object's status stable when switching scenes??