Kurjuus's Recent Forum Activity

  • Hello!

    I wonder if there's any way to do this:

    I got 1 string variable color with 3 values: blue, green and red. And I got 3 int variables for each color: blueTimer, greenTimer and redTimer

    Depending on which value you have for color, I want the action WAIT X SECONDS to have its respective color timer.

    I tried doing this:

    Wait color&"Timer"

    but the action won't take strings (totally comprehensible, you can't wait blue seconds). Is there any way to achieve it with a single action or do I have to do 3 separate events, like this:

    if color is blue, wait blueTimer

    if color is green, wait greenTimer

    if color is red, wait redTimer

    Thanks!

  • I finally fixed it! I don't know why but it was the deceleration. I changed it to -99 and now it works.

  • But I did, initially my events didn't have any angle action except the loopindex, which is necessary. The bullets wouldn't keep their original angle, that's why I tried to fix it with the stored angle. Doesn't work either.

  • shameful bump.

    Does anyone have an idea why the bullets are not keeping their original angle?

    I recreated the same events and actions in a new blank game, without anything else, and still happens the same. The bullets won't keep their original angle no matter what.

  • Yeah that's what I initially thought. It should continue at its current angle because I didn't touch anything related to their angles (except for the loopindex), but they all go either 0 or 180. That's why I stored their angles.

    __

    I've changed all the actions to "Set angle" instead of "Set angle of motion"

    and now it works only for SOME of the bullets, randomly. I don't know why.

    I've also double checked if there's any other event affecting the angles.

  • Thank you lions_! I still have got to grasp this programming logic, it escapes me easily :P

    That fixed the issue with choosing which bullet survives. Do you have any idea why that bullet doesn't keep its original angle?

    It always goes either 0 or 180. That's why I stored their original angle into that instance variable (iniAngle), but still doesn't work, so I guess something's off.

  • Hello folks,

    I'm trying to do a simple mechanic but I'm having problems. I'm trying to make an enemy fire 8 bullets that will stop almost immediately, then only 7 of those bullets will be randomly destroyed, and the one that is left alive will start moving again at its original angle.

    This is what is happening instead:

    i.gyazo.com/bc112ebf3d3e33e675db16125a80903c.mp4

    As you can see, sometimes no bullet survives the purge, other times more than one will make it, and none of them will follow its original angle (except those who have 0 or 180 as their angles).

    These are my events:

    I guess I'm overcomplicating stuff since I think this should be a really simple mechanic to achieve.

    What do you think?

  • You were right on the trigger once event! I removed it and that fixed it.

    In my head it made sense because I thought, if poisonTimer hits 0, then it'd subtract 1 from HP every tick while it's 0. But I just realized it instatly changes its value in that same event.

    Thank you!

  • When it's touched by the poison cloud, it triggers one tick and then it stops. The bool (beingPoisoned) is TRUE but the timer is at 0.

    Once that enemy suffers 1 tick and stops being affected, as long as he is overlapping a cloud (new or old), it stays unaffected. If I wait until he's no longer in touch with any cloud and poison him again, then it works.

    It's just so weird...

  • Hello!

    I'm trying to create a poison (fart) cloud that damages enemies every 0,6 seconds and it should affect a group of enemies at the same time.

    The thing is, it almost always leaves one enemy unaffected (from a group of any number of enemies) and it's always the one that as 0 / X as Z index. (I don't know what that could mean).

    Sometimes -although veeeery rarely- the cloud affects everyone. I've tried shooting from every angle but it doesn't seem to change anything.

    Here's a video showing the issue:

    i.gyazo.com/3a8a874e63021a47ebff3f3796607c02.mp4

    and here's a capture of my events:

    Do you have any idea what could it be?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Functions happen.

    They won't work properly if there is need to run more than one in one tick.

    XpMonster Yep, it was definitely that. Now it works smoothly without that destroy function, thank you!!

  • Hi!

    So far I've succeeded in having my enemies in the same family having its own HP. The problem is, when I hit two of the SAME type of enemies(same family) at the same time they get bugged and become unkillable (and the rest of the family as well)

    Everything works fine if I hit two different enemies(same family) simultaneously.

    Here's a GIF:

    i.gyazo.com/3b1946a4f2f60e651dde1a520d519364.mp4

    If I hit two bats at the same time, the first will die as intended, but then the rest of the family will suddenly go GodMode_ON.

    and here are my events:

    What do you think it's going wrong here?

    Thanks!

Kurjuus's avatar

Kurjuus

Member since 29 Apr, 2020

None one is following Kurjuus yet!

Trophy Case

  • 4-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

7/44
How to earn trophies