LittleStain's Forum Posts

  • Is your animationspeed set to 0?

    Condition:

    -On left click on "LightObj".

    --subevent:

    -if Lightobj animationframe = 0

    -action:

    --Set "LightObj" Animation Frame to (1).

    --system else

    --Set "LightObj" Animation Frame to (0).

  • Ok.. remember the game now..

    The effects in it can be achieved without physics..

    But it will take some coding to get the desired effect..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi RenatoB,

    To be honest I've seen many games and helped with many, so I really don't remember which one you are referring too.

    To answer your question:

    Physics behaviour is very CPU intensive, especially if you use many objects and use collision polygon for collision detection.

    Are you using the cocoonJS physics engine?

    Faking the gravity is possible, but I doubt it will help you improve your performance, it could though.

    Maybe you should have another look at your game and decide if you really need physics or if working with bullet-behaviour with gravity would be enough with some tweaking.

    I have once created a custom movement faking gravity for a game, because only the player object really needed gravity-like behaviour, this worked so it is possible. (In the end I had to pull a lot of rabbits out of my hat to prevent fps dropping, for it also had issues with collision detection.

    If faking gravity is your only option I could have a look to see how to implement it in a way that would be beneficial, but I think dropping physics altogether and using other behaviours to fake the physics behaviour could be of more use.

  • I can't open your capx, but could the clamp expression help you to bind the enemy?

    to attribute to each platform you could use:

    system for each platform.

  • bullet set angle : angle(zombie.x,zombie.y,player.x,player.y)

  • for each zombie

    system compare two values : distance(zombie.x,zombie.y,player.x,player.y) < 50

    zombie set bullet speed to 0

  • I think you are setting the sprite angle instead of the bullet angle..

    And probably you'll want to set the bullet speed back to 0 when the distance to the player is close enough.

  • In the bullet behaviour properties you can set the set angle to no.

  • Give the object a boolean variable

    on object clicked set set boolean to true

    on tile clicked if boolean is true move to tile

    on arrived set boolean to false.

  • Did you look at the moveto example in the new project dialog?

    Using bullet without setting angle is a possibility.

    You could also use the moveto 3rd party plugin, you can find it in the plugin section.

  • Make sure the original direction of your sprite is facing right.

    Example:

    <img src="https://cdn1.iconfinder.com/data/icons/defaulticon/icons/png/256x256/arrow-right.png" border="0" />

    Make sure in the bullet behaviour properties set angle is set to yes.

  • Is your screen big enough for the taller level?

    What way have you set the scaling in project properties?

  • The issue here is the scrollx and scrolly

    By changing the paralex of the layer scrollx and scrolly are not related to the layer anymore.

    I think your setup would work if you change scrollx with (viewportleft(0)/2) and scrolly with (viewportbottom(0)/2)

    the (0) behind the viewportleft determines the position on layer 0 that is in the middle of the viewport, so it should also work if the layer uses different paralex.

  • So you only have to use the x-position and set the y to viewportbottom(0)+0.5*objectheight.

  • if you want the whole object to be within the viewport you should add or subtract object width and height to those values.