DogeDev's Forum Posts

  • Ay bois, so, this time i need to do an Undertale Based Text Chat, like whenever a letter appears, it plays the sound of the character that is saying. I don't know how to detect if a letter is loading to play the sound or something else, so, if you could help me i would love.

  • Hello again,

    I seen your capx and I advice you to see the capx that are in examples of construct to learn a bit from them...

    there is some nonsense things as you ussing a family for enemigos while is only one sprite object! you do not need a family in this case... if you would have different sprite object then yes... families are meant to control different (same type of object).

    also none of my advice are in the actual capx... maybe you should update it

    if you got google drive and share a folder I can upload a fast version (I do not have much time but can try to help you a bit)

    Hey bro, and, just explaining some things, in my .capx i was planning to add more enemy types, so, to be faster, i already created the code with 1 sprite in the family that would be more easily to edit when i gonna add more enemies type. In the .capx that i've shared, i didn't used your code, it's on the .capx that i'm editing like with some broken codes and more, that's why i shared an old one. And, in the phrase "I advice you to see the capx that are in examples of construct to learn a bit from them..." i didn't get what type of .capx you want to me to see, like in general, i have already studied almost all fo them. And, thanks for helping me bro! I really would like more advices of what you'd say!

  • Hope this screenshot it's useful for you both

    That's worked for me! Thanks bro, but, i have another question, below is the .capx that i'm trying to create an automatic system for enemies ( like dying, spawning, collisions and more ) to use in my future games, i'm not so good at programming but please, can you review my .capx and tell me where i can optimize and improve my code? Btw, thanks a lot for you help, i really appreciated it!

    .capx: dropbox.com/s/6dt9mv13mwditpn/Sistema%20Morte%20Autom%C3%A1tica.capx

    Sorry for another language in the .capx, and, in the .capx, the way that i was trying to make the bar visible is when the enemy collides with the bullet, or, basically when he gets damaged.

  • You do not have permission to view this post

  • Hello its really simple, look:

    you need to create a instance variable on that object. when you create a new copy you just have to change that instance variable for something that identifies, for example:

    create new spriteBar

    spriteBar.variable = "player"

    create new spriteBar

    spriteBar.variable = "enemy"

    when you want to hide only player bar:

    system/pick by comparation/ pick spriteBar which SpriteBar.variable = "player"

    ---- > spriteBar set visible to invisible

    so you can pick any copy of the same object identifying it by variables and treat for the most cases as a different object

    Yes, that would be possible, but, there is a way to do it like automatically? Because, whenever is an enemy on screen, the bar is automatically created by the container, not a trigger, so, i don't know if i can do that. My objective is to when the bullet hit the Enemies family, automatically, the bar of that specific enemy shows up.

  • Bullet on collision with enemy, set health bar visible. Should work if they are in a container.

    Already tried that but somehow didn't worked, btw, i used family instead of the enemy to optmize my code, so, it's possible to use family and get the same result? Like with another code

  • Ay bois, and this time, i'm trying to make a copy of my object be visible, while the original one be invisible, i don't know if it's possible or not, or, if i can do it in another way without creating objects.

    So, i have a sprite called Bar1 and it's the health bar of my enemies. So, my objective is to: When the bullet collides with the enemy, his bar ( not other enemies bars ) shows up. It's the same object Bar1 being visible, while other objects Bar1 be invisible. I tried using container and family ( idk if i used then wrong ), but, i couldn't do what i'm trying.

    If you know how to do it tell me pls!

  • Ay bois, so, this time i'm trying to make an dynamic automatic reloading system without bugs, but, sadly it went wrong.

    The image link below display the code that i'm using, and, in the code, obviously it will glitch when reaches 5 Remaining Ammo, so, i want to make a fix to it, like when: 5 / 6, if the players reload, will be 6 / 5 and, if the player gets 0 / 5 then reload, will glitch the ammo.

    Image: imgur.com/a/3J8CJ6R

    I tried to think a solution about this but i can't, so, please, if you know how to help, say!!

  • Change your formula for the following:

    lerp(Self.Width, min(610 * (PlayerExp/ExpNeeded), 610), dt * 2)

    *Edit: fixed the correct formula

    Thanks bro! That worked perfectly!!!

  • Ay bois, this time, i'm making an game that you can level up, yay. But, i don't know, how to make my exp bar scales with the Xp.

    I already maked an advanced xp bar that will lerp with the amount of the xp. But, the width of the Xp bar is 610, and, i need it to scale to the Xp. Like, if the xp needed to level up is 47500, they will scale it to when the player has the 47500 of Xp, the bar width will be his maximum, that is 610.

    I'm using this code to do the lerp, and, i tried changing some values but i don't know how to scale this thing, if you know how to scale it, please tell me!

    Code: imgur.com/a/05cllg6

  • I think you can just compare the two as variables and change the animation of the enemy accordingly, with the animation being the one with the appropriate color.

    That is what i tried but didn't worked.

  • I'm happy that worked!

  • I am making a strategy where your units start to attack enemy, when they collide with him. But this trigger is called every tick. Instead of taking one health point, takes 6.

    Sorry for my English.

    Hey bro, check this image, you can try it to see if it works.

    Link: imgur.com/a/7THGwnw

  • k I can move it to that forum. Changing order of event doesnt do anything. Already tried it.

    Sorry, so i can't help much in C3, good luck on getting help in the other forum!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • And another tip, if you're using C3, you need to post it on Construct 3 session How do I, and, not in C2 session.