caiorosisca's Recent Forum Activity

  • My idea was something like OddConfection said, having a variable that only goes up (you might need to check if the player vectorY is positive so you don't add negative values to the variable, not sure if speed is negative when going downards).

    Imagine it like this player speed is 10, variable starts at 0, you add te speed(10) to the variable, scroll camera to the variable. On next frame camera will be at position 10, that keeps on going until you start falling, Imagine you kept it going until you reached 100 height, if you don't subtract values from that variable it will stay at Height 100, then you can check if distance between playerY and cameraY is greater than X value to check if he died.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just a quick tought, have a variable like cameraHeight, as the player goes up, add the player's speed to that variable, (never subtract from that variable) then set the camera to scroll to that variable on the Y axis. I think you get the idea. You need to check if that works.

  • Ok, my solution is to have ObjectA creating a new object (ObjectB) at it's own position, then destroying itself.

    Create an event that checks for ObjectA.X < 293, for actions choose ObjectA > Spawn another object> select ObjectB, choose the layer you want, and leave 0 on the image point box.

    Next action is ObjectA > Destroy.

    Another alternative, I'm not sure if that works in your case, is to only change the Sprite's animation frame (in case the objects are only visually different)

  • I'm not sure on what you are trying to achieve here, I can't really see how animating sprites can be replaced by spawning/deleting.

    My thoughts:

    1- Spawn/Destroy, if you are going to spawn 72 objects in 1 frame, that may cause a significant fps drop depending on the objects.

    2- Having 72 sprites on the screen is quite a bit of sprites, if you have collisions or another interaction between them, could be a problem.

    3- Animating? I don't really get how it can solve your problem, do you mean moving them out of sight?

    It's hard to tell you the best way without further details on the project, maybe a little more explaining or some screenshots may help.

  • x < 293 ? a > spawn another object "b"

    a > destroy

  • Check this topic

  • I never used the boids plugin before.

    Since your capx needs a 3rd party plugin for it to work you should provide a download link for it, most of the people on the forums won't install a 3rd party behaviour just for helping you out, mainly if you don't provide a source for it. Btw you should contact the plugin's creator to check if both behaviours that you want will work together.

  • I can't fix it for you now, but here is my tip. Start using subevents, your events are probably conflicting. Think of what is more important first and start sub dividing the other events. For example..

    |-PlayerDectect (x) is moving > Add stamina

    |

    |_-Else

    | |_PlayerDetect is on floor

    | | |____- PlayerDetect is Running > Subtract Stamina

    | |

    | |_ Else

    | |___ PlayerDetect is Falling or is Jumping or is WallGliding > Add stamina

    Another tip, don't update the width of the stamina bar directly, create a variable for stamina and add and subtract values of that variable, then update the bar's width based on that variable

    bar set width to maxBarWidth * (currentStamina/maxStamina)

  • You do not have permission to view this post

  • I haven't read the whole post, but someone asked for a similiar (if not identical) thing a few days ago.

    Check if that helps.

  • I'm not good at maths either, but I think that is the formula your are after. Give it a try, if it doesn't work search for the equation of the line

    vol = (greenBox.width*100 + -100 * abs(Player.X - LayoutWidth))/-greenBox.width

caiorosisca's avatar

caiorosisca

Member since 20 Jan, 2014

None one is following caiorosisca yet!

Connect with caiorosisca

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies