gamecherry's Forum Posts

  • Hello and thanks for looking. I have a car object that, on button press, creates a particle object on the car imagepoint. Depending on how fast the car is moving, the particle is instantiating well behind it. If stopped, the particle is created exactly where it should be.

    My question is; is this a problem with my pc being too slow or would this happen regardless? I could code in a fix but if it's my pc, then it's not going to look right on the next pc.

    Solved below by Silverforce

  • Hello and thanks for looking. Is there a way to set MovingAngle at the start of Layout?

    I'm using the "Car" behavior to move a sprite. At start of layout I'd like the sprite to begin with a moving angle of 225 but I can't find anyway of addressing MovingAngle.

    Thanks

    I still haven't found an answer but worked out a temp solution - simulating controls of the car to achieve correct MovingAngle then positioning X,Y.

  • Thanks so much, Spongehammer. This is exactly the direction I needed to go. I found this https://www.scirra.com/tutorials/1167/l ... er-example

    Thanks for your help.

  • Hello all, thanks you for looking.

    I have an object that's created on layer 1 then moves its way upward through multiple parallaxing layers to layer 5.

    So, Layer1 - 27/100 parallax

    Layer2 - 42/100

    Layer3 - 63/100

    Layer4 - 100/100

    Layer 5 110/100

    Because the layers are moving at different speeds, their X coordinates appear at different points on the screen - so, the big question: Is there a formula to derive what the X should be in order to make the object appear to instantiate at the same point regardless of layer?

    Thank you for your time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • SOLUTION:

    I found a solution. If I give the enemy an 8 direction Movement behavior (or Platform) then I can compare its MovingAngle in System and set the animations that way.

  • Hello All, thank you for looking

    I'm using the Pathfinding command to move an enemy around the screen. How do I determine the direction it's moving so I can apply walking animations, etc?

    Thanks

  • You're correct. I have the flu...my brain is not at optimal performance I am getting the correct angles....perhaps, my code is wonky.

    Thanks for the reply.

  • Hello All and thank you for looking

    I have 2 objects; an enemy & a hero. I want the enemy to change animations depending on the angle between the 2.....but, I cannot figure it out.

    If I use int(angle(hero.X, hero.Y, enemy.X, enemy.Y)) I can get a number but it changes as the hero moves closer or further away form the enemy (doesn't follow a set perimeter.)

    In the diagram, the dark blue circle is at ~330 degrees but the the light blue circle is not. I want C2 to return the same degree regardless of how close/far the circle is and instead just give me the angle it sits on? How do I go about setting a command that returns the angle I'm looking for?

    Thank you for looking

  • the only thing I have left to try is a loader layout and hope that fixes the problem, otherwise I'm screwed.

  • Elios, thanks for the capx! I ended up testing the distance between my character and the water noise and adjusting volume accordingly. I'm curious if we came to the same conclusion mechanically.

    Thank you so much for the assist!

  • exactly what I was thinking but I don't know how to fix that. I don't even know how to test for that. Do you?

    To the Google Tubes I go!

  • So, my thinking is that none of the files are bad, images or audio. I think it's just not pushing the whole file out and the errors are the files it was in the middle of loading when the data stopped. Otherwise the images/files would always be same or at least not load.

    And it doesn't always hang - 1 in 10 times it loads completely.

  • I've now run the game in both Chrome & FireFox numerous times.

    I've compiled it several times as well with & without minify & with/without image compression.

    I've swapped out the erred images in engine and compiled - several times.

    The game still hangs on loading screen.

    It will hang at any time in the process between 50% - 99% Maybe one in 10 times it doesn't hang.

    It's always an image error.

    The image that erred is almost always different.

    A browser refresh loads the game every time.

    In Chrome error reads as:

    Error loading image 'http://gamecherry.com/mhsmbtest3845LQ6/images/wcfacade-sheet0.png':

    Event {clipboardData: undefined, path: NodeList[1], cancelBubble: false, returnValue: true, srcElement: img…}

    c2runtime.js:95

    In FireFox it reads as:

    Error: Image corrupt or truncated: http://gamecherry.com/mhsmbtest3845LQ6/ ... sheet0.png

    Source File: http://gamecherry.com/mhsmbtest3845LQ6/ ... sheet0.png

    Line: 0

    The erred image is almost always different & that's why diff. images in the 2 examples.

    I don't know why this is happening. Has anyone else experienced this?

  • Blackhornet, thanks so much! IDK what that means but at least I have a place to start looking. This is great!

  • thanks for taking the time Zenox. Here's the link to the game - http://gamecherry.com/mhsmb383/