tysm my eyes aren’t bleeding anymore
@ALUCARD @lifeofpain what is this sorceryyyy???
like i upload an image ( example, smething i drew) then add that script and i can move it?
sort of. it has to be a sprite entity
ok ok , i still havent gotten around on how to incorporate a sprite into my game. still learning from tutorial videos.
any other tips you might have?
No actually I think its a plane
Well this is my entire project here. Let me know if there are any features you here you would like help with. Just dont go into my project and steal my code, thats lame.
Ravioli Burglar Simulator by 18 Aliens (itch.io)
That rpg test was just some random thing I made in this game to test, it took me maybe an hour maximum.
me help?i just started last week lolz
i dont even know where to begin bro, you’re way more advanced
oh no stealing other peoples hard work is SUUUUPER LAME, i agree, and i would never do that bro, scouts honor!
cool cool thanks for the help
I meant if you needed help.
oh ok ok gotcha hahaha
heloooo anyone know how to code a jumping mechanic with the rolling ball game?
yeah
whateverthescriptis.prototype.initialize = function() {
this.app.keyboard.on(pc.EVENT_KEYDOWN,this.jump,this);
}
whateverthescriptis.prototype.jump = function(event) {
if(event.key == pc.KEY_SPACE){
this.entity.rigidbody.applyImpulse(0,1,0);
};
}
yoooo!!! thanks buddy!
i just paste this on the movement script, right?
can i paste it anywhere or does it have to be in a specific place? sorry, super noob here
also does this apply physics/ gravity thingy? like if i press the space bar multiple times, it doesnt make the ball jump in the air?
it allows you to fly lol. you cant paste it but if you take the basic concepts in it you can apply them to the script.
so i pasted it on the last part, didnt work.
changed the “whateverthisscriptis” to movement lolz im just doing this as i go hahaa
you are using two initialize functions which you shouldnt do. i got it incorrect and “keydown” should be replaced with pc.EVENT_KEYDOWN. hope this may help
You have to add Rigidbody component to your entity you want to jump with, it adds a basic physics to the object
You also have to be very careful how you initialize those functions as i can see you use Movement for one and MouseEvent for other ones, the first part of creating a function is very important otherwise it wont work, it has to be the same as your script name is, so if you named your script Movement then it has to be Movement everywhere and not MouseEvent, it seems that you just copy/paste the code from another script you found somewhere so just try to remember that… but its good to start slower because it appears you are jumping to advanced stuff without properly learning the basics, but its okay i was the same and learned along the way but it slowed me down just because i was too lazy… i recommend you to start over and start with more basic stuff
@lifeofpain - ok thanks buddy
@smokys - ok, ill work on it , thanks bro
Very good friend is chatGPT, just ask him and he will give you some tasks to do as a beginner and will teach you as well if you dont understand something, i was very amazed how well it knows PlayCanvas
one time bing copilot told me that 1.4 + 1.4 = 2
@ALUCARD huh? wazzat?