Go48Games's Forum Posts

  • 8 posts
  • Something like this ?

    I adjusted the capx a bit so you could see what I mean.

    The line needs to go down, I can do that but that means it should always keep spawning another sprite when going down. I could ofcourse adjust the i variable to 1 million, but that would need to much processing power. and it wouldn't exactly be infinite

  • So I want to make a random line, that always goes up (never goes down again). If you have any idea how I can simply do that, that would be nice. I want my sprite to always stay ontop of that line if he falls off; its game over.

    I decided to spawn my sprite everyime my previous sprite.Y was equal to 0 and then do that over and over again so it would eventually be an infinite random line, also everytime it spawned the line would turn a little around it axis, so to keep the line "not straight". The "line" is actually a rounded rectangle and I'm trying to create the illusion so that when they spawn on eachother it looks like a straight line.

    My problem is everyway I try this, the line stops after 1 spawn or never spawns at all.

    I included a sketch, to try and make this clearer, I hope you can read my handwriting <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    (if you have problems viewing the picture try this link then: http://imgur.com/s0nHDfe )

  • So my game is almost finished and I wanted to add highscores. I searched for some tutorials and I read most of 'em. But for some reason the highscore value keeps displaying "NaN". For ease of understanding I created a new construct 2 project where I have the same problem.

    What am I doing wrong?

    The included capx file is very basic. Its a text box, when the game starts: every second 1 is added to score. and then if score is higher than highscore it will be saved and displayed.

  • > Thanks its exactly what I needed. To get it to work with my own sprite I tried to change to code from Sprite.X .... to Newsprite.X and everything else where "Sprite" was mentioned. I also added the 2 instance variables to my newsprite. But it doesnt seem to be working, what did I do wrong, did I forgot something?

    >

    In the Mouse on any click event, you need to set the instance variable Destination for the Newsprite not the blue sprite.

    Ok so everything seemed to be working, until I noticed this problem. When I press at the left edge of my screen, my sprite goes to the edge of my screen(which is what I want) . But when I press on the right edge my sprite doesn't go to the edge of the screen. It only comes closer.

    The "eiland" sprite, does the same thing as the "newsprite"

  • > Thanks its exactly what I needed. To get it to work with my own sprite I tried to change to code from Sprite.X .... to Newsprite.X and everything else where "Sprite" was mentioned. I also added the 2 instance variables to my newsprite. But it doesnt seem to be working, what did I do wrong, did I forgot something?

    >

    In the Mouse on any click event, you need to set the instance variable Destination for the Newsprite not the blue sprite.

    Thanks, stupid mistake. everything is working now

  • There are so many ways this could be accomplished using the standard behaviours it would be nice to know what your further plans are with the character so you get the best advice..

    I want my guy to roll over(on x-axis) to somewhere so it can catch stuff thats falling down.

  • Go48Games

    I made an example for someone else who wanted to move something left and right slowly to a point based on where the player tapped.

    It might be useful for you.

    [attachment=1:2tqtkjqq][/attachment:2tqtkjqq]

    Basically it's setting X position using lerp every tick to slowly move it to the destination with a clamp to make sure it doesn't go too far.

    [quote:2tqtkjqq]On a side note how do I change the position of "what you can see" when you start the game?

    You can use the actions System->Scroll to object/position/X/Y to move the camera, or alternatively, give a player character the ScrollTo behaviour

    Thanks its exactly what I needed. To get it to work with my own sprite I tried to change to code from Sprite.X .... to Newsprite.X and everything else where "Sprite" was mentioned. I also added the 2 instance variables to my newsprite. But it doesnt seem to be working, what did I do wrong, did I forgot something?

    EDIT: the included image didn't seem to be displaying correctly: this is the imgur code : JQiqPZM.png

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to make my sprite move from point A to B, the way it is now is, when I press on a place on the screen it INSTANTLY goes to the point where I clicked. You might have noticed I put the Instantly in caps lock. That's because I want it to"Roll" towards the position. (Slowly walk).

    I know I can create the roll effect by just rotating the sprite clockwise or counter-clockwise. But it has to "walk" toward the point where I clicked. I've tried alot of behaviors but haven't found what I needed.

    I also include an image for further explanation.

    On a side note how do I change the position of "what you can see" when you start the game?

  • 8 posts