Maako's Forum Posts

  • Problem Description

    Disabling the Platform Behavior while the object is moving and then re-enabling it will make the object continue to move for a brief moment even though no movement keys are being pressed.

    Attach a Capx

    http://www.filedropper.com/platformbug

    Description of Capx

    A sprite object with platform behavior and 2 events to enable/disable it

    Steps to Reproduce Bug

    • Step 1: Left click to disable the platform behavior while holding down left or right arrow keys
    • Step 2: Right click to re-enable platform behavior while not holding down any keys Observed Result Object continues to move for an instant after re-enabling platform behavior while not pressing any movement keys Expected Result Object should not move at all after re-enabling platform behavior Affected Browsers
      • Chrome: YES
      • FireFox: yes
      • Internet Explorer: yes

    Operating System and Service Pack

    Windows 10 Version 1511

    Construct 2 Version ID

    239

  • I'm trying to make it so that, When clicked on object, create a copy of object, but I don't want to have to copy this code for every individual object.

    Is there a way to somehow make it so that, When clicked on Family object, create a copy of that specific family object?

    Thanks for any input

  • Hey thanks for the info.

    I'm not sure what you mean about comparing the values though.

    Is that a way to tell which side of my Player Sprite the cursor is on?

  • I need to actually pin a sprite to the mouse cursor and not just change what the cursor looks like for code specific reasons.

    Using either the Every Tick or Pin function causes the sprite to drag the faster the cursor goes.

    I need this because I want a sprite to change directions when clicking depending on what side of the sprite the cursor is on, and there's no way to determine that using the mouse object that I can see.

    Thanks for any help

  • I'm trying to set a health bar's position to a sprite's image point, but when the sprite's angle changes, the image point moves with it.

    Is there a way to make it so the image point stays in the same place?

    My current work around is to set the x and y of the health bar to the sprite's x and y then add whatever numbers to them to stick it where I want. But I want to make multiple sprites of different sizes and would like to stick the health bars to them in one chunk of code.

    Thanks for any help.

  • Ooooh, I see. That makes sense haha.

    Thanks a lot

  • I'm trying to get multiple copies of sprites to move towards enemy sprites that are closest to them.

    What I have is:

    Event:

    If PlayerSprite is not overlapping EnemySprite

    Pick nearest EnemySprite to PlayerSprite.X, PlayerSprite.Y

    Action:

    Set Angle of PlayerSprite to Position of EnemySprite

    The problem is that any copy of PlayerSprite will go towards the nearest enemy to the original PlayerSprite instead of the nearest enemy to itself.

    I feel like it's a simple fix but I just can't get my head around it right now

    Can anybody help me out?

    Thanks

  • Hey thanks a lot, this works great.

  • Hey I tried what you suggested and it still doesn't work. I'm pretty sure the "ID"s are being set correctly, but it's not setting their positions for some reason.

  • Oh oops ya you are right. However it still doesn't work even with that fix.

    So now it correctly sets the Items ID to the Slot UID.

    However the items are not being set to the position of the slots.

    Anybody know what's going on?

  • Sure here's a screenshot

    http://imgur.com/DBg07ew

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I feel like this is a noob question but I'm not sure why this isn't working.

    I'm trying to make items stick to a slot and stay there.

    I put the items in a family and made the code:

    If Items(family) are overlapping ItemSlot - Set value "ID" of Items to UID of ItemSlot

    If ID of Items = UID of ItemSlot - Set position of Items to ItemSlot

    Nothing happens when Items overlap the ItemSlots.

    Anybody know what's wrong?

    Thanks

  • I mean the actual full program, not just created games.

    I read on another post from google that if the tablet runs Windows 8 it should work, but that was from 3 years ago.

    Is that the case? I'd just like to make sure before I spend money on a tablet.

    Thanks

  • Hey thanks for the response. What do you mean by "(event, auto every tick if in front)"?

    I'm not sure what you meant with the brackets, so I just tried the basic code without what was in the brackets. It made the second Mover follow the first Mover's target.

    I think I understand how UID's work, but in one of the tutorials it says "UIDs change if you delete and insert instances...the instance with UID 3, for example, could change to a different object if you add or delete some things in the layout view".

    This kind of confuses me because I have a code that sets an objects "ID" variable to another object's UID once when it's created, and the code still works if copies are created/deleted. I'm not 100% sure how they work and that's why I'm kind of just copy/pasting code from other parts that work.

    Anyways thanks again for the help.