EyezWidee's Forum Posts

  • Okay thats actually pretty interesting I didnt know that, I try to avoid using every tick with variables feels like it hinders the performance especially when it involves webstorage. But I'll deff give that try also.

  • To get objects to spawn every 30 seconds you could try:

    Every 1 second - add 1 to (Variable)"Timer"

    If (Variable)Timer is greater than 30 - set value to zero

    Then on (system) on end of layout - (system) reset global variables

  • Looks like you'll need some trigonometry. The three Trigonometric functions are sine, cosine and tangent. In C2 their system expressions are cos, sin , tan // for inverse: acos , asin , atan .

    I'm in the process of trying to set the accelerometer's zero point to the users phone's position/angle he is holding it on start of layout. There's alot of trial & error involved but the purpose of it is to allow the player to play the game without compromise to the how they want to hold the phone to control their player since my game is 8 direction tilt based.

    Try working with Touch.Acceleration expressions and comparing two values. You can also create a variable & subtract from that every time the player moves.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay will do.

  • Is there a way I can use the cos & sin system expressions to set the zero point to the phones position/angle?

  • Yeah I just finished doing that - I set the startbeta to touch.beta on start of layout - I still have to hold the phone flat to move. The controls work fine I just dont know which expressions determine the angle/position the phone is being held.

    Event sheet: dropbox.com/s/nmksygz76e6ya2o/axis.PNG

    Example with flat zero point: dropbox.com/s/ytn6oqzn5k6irst/Accelerometer.capx

  • Current Event Sheet:

    <img src="https://www.dropbox.com/s/nmksygz76e6ya2o/axis.PNG" border="0" />

    The events currently in the game allow for true 8 directional tilt movement, even setting the balls position to scollx & scrolly at the start of the layout.

    The trouble I'm having now is setting the axis on start of layout so the controls can be based off the angle to player is holding the phone instead of a fixed number. I.e Player should be able to use the accelerometer controls wether the phone is horizontally upright or horizontally flat.

    Ex: dropbox.com/s/ytn6oqzn5k6irst/Accelerometer.capx

  • I wasnt able to set the axis on the start of layout. Setting the axis on the start of layout allows for the player to hold the phone at different angles without compromising the touch controls which are accelerometer based.

    I did learn tho that I could create a variable for "Axis" and set its value to: "Touch.Beta & Touch.Gamma". I would do that for both On Start of Layout & Every Tick but how would I set the appropriate controls since I need to compare the orientation to a value

    Seems like theres a Million and twenty plus incorrect ways of doing this & I'm hoping to minimize Trial & Error on this particular obstacle.

    Give it a Try : dropbox.com/s/ytn6oqzn5k6irst/Accelerometer.capx

  • Thanks for the insight, I'm gonna spend the night tryna figure it out.

  • Okay, I'll try that out. I think that might work for setting the axis but even then I'm wondering how does subtracting that difference upon start of layout or on button pushed allow me to use the accelerometer if I have to make up a value for the global variable

    & If I'm subtracting that difference every tick how would I write that code. Every Tick - Subtract [Difference] from Global Variable ? or from Alpha Beta Gamma?

    Thanks

  • I want to make a game that uses the touch accelerometer feature, where the player can use 8 Direction movement. How do I set this up & in a way that the axis is set at the start of the layout.

    • The player should be able to hold the phone at different angles but the axis is set on the start of the layout so based on that the player can move (8-Direction) using the accelerometer

    Example:

    dropbox.com/s/ytn6oqzn5k6irst/Accelerometer.capx

  • Hey,

    I wanted to know if anyone has had any experience using tilt controls with the 8 directional movement behavior.

    Basically I have a game similar to Helicopter, what I want to do is allow the player to use the accelerometer to move Left, Right, Up, and Down. In the capx example below I was able to get the Up & Down movemnet correct but wasnt able to do so for moving left & right.

    Is there a way to set the zero point at the start of the layout so the player isnt positioned to a disadvantage when the game starts?

    Any insight on this would be much appreciated

    dropbox.com/s/zr629s8i3f6faw8/HelicopterTilt.capx

  • Thanks again my guy very much appreciated

  • Thanks a lot man!

    I was using image points for both the player and rockets for mirroring but only the blaze was doing so. I used the invert so that the gravity stayed at zero when the players Y axis reached the VectorZero sprite even if it collided with a bullet sprite.

    • How'd you get the Blaze to loop & do so at that speed with out events. I didnt notice any changes in the properties except for the container for the player & rocket lol
  • Hey,

    I'm having some trouble getting objects to mirror upon the player's movement.

    • The Player moves left or right & the rocket sets its position according to the image point of the player & the rockets fire according to the image to the rockets image point

    I saw some similar questions in some past forums but wasnt able to succeed based of their input

    dropbox.com/s/h3ws06kip6p3qsu/Level2_BluePrint-3k8y8jenijj4j-3k8y8jenijj4j.capx