Michal11's Forum Posts

  • Thank you but could some of you be that specific and actually past a code example here? just take mine and reedit it. I am not programmer so I am totally lost :) sorry for so many questions.

  • Here's one way to do it:

    stepMovement.capx (r99)

    Thank you I have to study it more because it seems complicated in this example.

    However I tried to understand lerp by my way, I think I finally understand little bit why is it useful. But still no luck.

    Now I have every 8 second, enemy1 move forward and I Put in: lerp(enemy1.Y,enemy1.Y+50,0.8*dt)

    but the movement is still not smooth and it still looks like it is jumping to that position :/

  • I would like to use lerp as I want to learn it without plugins but I dont understands how lerp will help in this case. Could you be more specific how should I use lerp in this situation

  • Rory: yeah I am trying to use it but no luck :/

    shinkan: yep normally I use it. Since this is just testing for me I did not in this case.

  • Hello guys I have enemy what I am doing is that every 8 seconds this enemy moves forward by 4 pixels in current angle. So I have like:

    system every 8 seconds

       enemy move forward 4 pixels

    The problem is that I want my enemy to move smoothly. I mean right now the movement is kinda jerky. It looks more like it jumps to the new position. But I want it move smoothly by those 4 pixels . How to do that? thank you

  • Ok guys,

    this is probably going to be pretty hard. I have this:

    https://dl.dropbox.com/u/97534866/ai.capx

    where enemies can move whatever way they want (360). What I have is that if distance between player and enemy is smaller then 400 than enemy starts to move in player's direction.

    The problem is that there is wall and enemy goes straight to the wall of course and get stuck there :). I need to make it smarter to beeing able to walk around the wall smoothly. Whats the best way for this?

    If I had only 4 way movement (up,down,left,right) then I know how I would probably do that. I could have variable which would store direction of enemy moving. Then from that I would be able to know from what direction enemy hit the wall and I could send it down for example or up whatever. Or I could have home some invisible direction sprites. But I feel in this case there must be something better.

    What do you think?

  • Hello guys,

    it seems like there is some kind of weird bug in behaviours between car and solid. Look at this example: https://dl.dropbox.com/u/11087850/Michal11.capx

    when you keep holding "down" arrow on keyboard and hit the fence with car back it stops how it should. But when you keep holding "up" arrow on keyboard and hit fence with front of the car then the car somehow starts to slid to the side. How come? it should be same

  • Don't use a tiled background, use several instances of the same sprite with an adapted collision polygon.

    Also you might want to use the condition "is overlapping at offset" to anticipate the collision, and not just react to it as with a "on collision" trigger.

    unfortunately it still does same problems. Sometimes if you angle of car is at certain position you can go through the wall

  • I don't see any "crazy bouncing" using the solid behaviour:

    Michal11.cpax

    Thank you. Well try to hit the wall with front bumper and keep holding up arrow and you will see. It is not like bouncing but more like sliding to the side. The interesting thing is that in the example you sent me if I drive backwards it works perfectly fine :)

  • Give the fence a solid behavior then on collision with fence set car speed to lerp(player.Car.Speed,50,0.8). You can play around with the numbers, I'm not sure what I'm doing but it seemed to work for me <img src="smileys/smiley17.gif" border="0" align="middle" />

    Thank you but it did not help either :).

    I somehow cannot believe nobody here knows how to do standard car collision with wall :)

  • I uploaded capx to dropbox if anyone would be interested in helping me out :)

    https://dl.dropbox.com/u/97534866/testing.capx

  • Add an event that says when the car collides with a wall set the cars speed to zero.

    Unfortunately this does not help as well :/ It must be something else. As I said most of the time 90% it works. But sometimes when my speed is too high or if I hit the wall and then try to turn my car to the side and collide with wall by car's side it goes through

  • Well that is exactly what I dont want. Because if you create wall as solid and then car has collision with it it bounce like crazy :)

  • Hello guys,

    I have game where car is driving on the road. Then another sprite is wall and when I hit the wall with car I want the car not beeing able to drive through the wall. I though I got it right but my method sometimes does not work and someties car somehow go through wall.

    Car has variable "way". When way is 0 car is going backwards when way is 1 car is going forward. I did that so I know if car goes backwards or forwards. In conditions I have this:

    <img src="http://img822.imageshack.us/img822/927/wallcolision.jpg" border="0" />

    Most of the time it works. However sometimes car gen go through the wall and I dont know. Do you know what could be the problem?

    The wall is not sprite but tiledbackground.

    Thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello guys,

    where can I find some good 2D graphic artist. Not for free of course. I need some nice sprites to improve my construct 2 skills as much as possible so I was thinking I could find some good 2D graphic artist, give him some money and sey I need about 30 sprites. Car, road etc. I know sites like deviantart etc by is there something better? :)