Forum.playcanvas.com

Make a healthbar for player in javascript

WEBok so thnx to yseour I now know how to code alittle better and I love coding now but I have a problem I tried using a canvas to draw the shape but it didnt work so I …

Actived: 7 days ago

URL: https://forum.playcanvas.com/t/make-a-healthbar-for-player-in-javascript/9403

How to make a healthbar

WEBFor a gun a common practice is use a raycast from the gun point towards the direction it is facing when press the fire key. If the raycast returns a result and that’s …

Category:  Health Go Health

Question: Can i use ```this.scale``` to shrink health bar

WEBOk so i have been trying to get my entitys health to go down for about a week now and now i kind of had an idea… So everything inside the editor is usable …

Category:  Health Go Health

[SOLVED] Making A Health Bar Tutorial, BUT

WEBHere ive looked for the problem for the past 2-3 hours and cant seem to find ANY problem and ik how to do this but something is off but eberything checks out if …

Category:  Health Go Health

[SOLVED] Health bar issue

WEBHi, Recently I trying to create a shooting prototype and I get stuck with the health bar. I got a wall which attached health.js and also my player also attached with …

Category:  Health Go Health

[SOLVED] Coroutines in Playcanvas

WEBI’m used to working in Unity where i can use coroutines to animate an entity over time or animate pretty much anything (like a score counting up or a health bar …

Category:  Health Go Health

[SOLVED] Reset score after lose/win condition

WEBmy lose condition is if hearts == 0; (executes score.js) and my win condition is if my player collides with the pillar at the end of each level (executes endFinish.js). any …

Category:  Health Go Health

[SOLVED] World space to UI space problem

WEBHello. So I’m trying to have a health indication over an object in World space. I’m using something like that: var elementPos = new pc.Vec3(); …

Category:  Health Go Health

Enemy Health bar does not rotate after switching scenes

WEB@yaustar Sorry to call on you but when i load the Health Bar tutorial scene on its own the health bar rotates with the camera so you can always see the health it is …

Category:  Health Go Health

Enemies share the same health pool

WEBI got a little problem i implemented a little health system for the player and the enemies. But my enemies share the same healthPool so if one gets damaged all recieving the damage… At first both where prefabs/templates so i thought ok if this is the problem i just copy one enemy and adjusting the attributes to the ones representive of him self. …

Category:  Health Go Health

Health Bar/Damage

WEBHey playcanvas team, is it possible for you to provide me a link to take damage and the health bar goes away if you get hit and die? On tutorials? We have the dead thing for health bar when you die and also the health bar (edited)

Category:  Health Go Health

Basic Enemy Ai Health/Spawn problem

WEBI know this is a 2 in 1 topic but i cant figure it out by my own. Editor: PlayCanvas | HTML5 Game Engine I got the editor link above, so my problems are the …

Category:  Health Go Health

[SOLVED] Player healthbar not respawning

WEBDavid_Warren April 23, 2020, 9:48pm 3. through the script named PlayerHealth, which is given to the player clone that u play with, when his health is 0, a screen shows up and …

Category:  Health Go Health

How to make the health system work

WEBI am making a health system for a game I am making for school, but I cannot figure out how to make the UI sprite for the health change clips, so I tried editing the script, but now it is giving me an error, does anyone know how to: Work with the fire script change clips of an animated sprite here is the project editor link: PlayCanvas | HTML5 Game …

Category:  Health Go Health

Need Urgent Help With Shooting Script!

WEBApply in your script the positive or negative impulse on that axis. Also make sure the bullet is cloned on the right position and direction. The easiest way is to do this is in the editor. The bullet has to be a child of the player in that case. You can then reparent the bullet by script before applying the impulse.

Category:  Health Go Health

How can I make my character jump

WEBYou have to attach a script & make sure the player has a rigidbody & collision component attached to it. Make sure the rigidbody is type Dynamic. Then code …

Category:  Health Go Health

I need help with shooting script

WEBGabriel_Dobrzynski March 30, 2021, 7:32pm 3. Hello @Gavin_Durbin, For the bullet mechanics in the script you can do: this.entity.translateLocal(0,0,-0.2); For (0,0,-0.2); …

Category:  Health Go Health