LittleStain's Recent Forum Activity

  • You might want to look into the persist behaviour..

    https://www.scirra.com/manual/161/persist

  • This seems to work:

    updated capx

    Just added an is nearest to open spot - condition.

    Might still be it's possible to move too fast, but it's working a lot better than the last one, for it reacted to multiple overlap.

  • I think you are overcomplicating things.

    I'm not sure why you'd remove the other actions and not just change the set angle.

    Why are you not picking the right instance inside the event?

  • Removed the every tick and added a function to only update on events that change values.

    Updated Capx

    I could have overlooked something, but think it should work..

  • There isn't an angle between corrupscepticeye and corruptscepticeye when it is the same instance.

    You pick an instance in your event, so in your action both are that instance.

  • I don't really like the program having to perform actions every tick, that only have to be performed every time some information changes.

    So usually I would add some events to only perform those actions when needed...

    But I only had an hour to spare, so this should do..

  • So using the above you could add actions to either one of the enemies in the collision, preventing the overlap.

    sending one of them temporarily in a different direction would do the trick, or increasing/decreasing the speed of one.

    It depends on what you would like to happen.

  • Using a family would be the best option, but for that you need the paid version of construct2.

    Without families, putting the animations together in the same object would be the best option to reduce the amount of events.

    That they are all different in size and shape shouldn't matter much.

    While writing specific actions for a specific type of enemy you would only have to check which animation is playing or have an instance variable telling you which enemy it is..

  • So here's how I would do it:

    capx

    (Not completely true, because I would try to prevent the text-update being performed every tick, but for now it will do)

  • Ok..

    What I said wouldn't take a week.

    You don't need global variables, because like I tried to explain using instance variables would work.

    I don't now what total.points is, I was talking about green.points and green.totalpoints.

    If you set green.totalpoints to 2*green.points there will be a difference, because 2*something is different from 1*something, unless the something is 0.

    Let's recap

    -you are changing the value of global2 on x2 pressed

    -you are NOT changing the value of green.points on x2 pressed

    • the string displays green.points
    • the value in the string doesn't change, because the value of green.points doesn't change.

    solution:

    either change the value of green.point on x2 pressed.

    or change the value of another variable and have the string display that variable, only using green.points as a number to calculate the value of the new variable.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The question is really not that clear.

    All I can do is shoot and hope to hit something, for I don't know what you are reaaly asking.

    Would pinning the buttons to the sprite work?

    If you'd like to resize the buttons the same way as the sprite it would mean calculating the size of the sprite compared to it's original and multiplying your button with that amount.

    so first you would need the sprite's original size.

    setting instance variables for originalwidth and origanalheight before changing it's size would do that.

    to change the button it would look something like this

    button set width - width= (sprite.width/sprite.originalwidth)*button.width

  • Ok so you just want to know how to add 10 degrees every time you click..

    the action should be

    object set angle - angle= object.angle+10

    every time the button is clicked 10 degrees is added to the current angle of the object.

LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies