LittleStain's Forum Posts

  • To do that use push or insert actions on the array-object..

  • I guess the issue is the sprMomo isn't referenced in the event, also if you are using set position the bullet behaviour will already be enabled,..

    I'm not sure what MomoIsInsideCannon does.. Or what Momofired Does..

  • Why not set the bullets angle of motion to AngleToAimAt instead of sprcannon degrees?

    And any reason why you are setting position of sprMomo instead of spawning it?

    Problem might be you are not referencing sprMomo in your events..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you are expecting the sprite to point at the mouse, this code won't do that..

    you are setting the angle of the cannon to the angle between mouse start and mouse end (to put it simply)

    this means the cannon doesn't take into account where the mouse is..

    if you left click and move right the angle will be 0

    if you left click and move left the angle will be 180

  • Strike that..

    guess I understand what you are trying to achieve..

  • Why not use a placeholder sprite and when image selected pin the animated sprite to it?

    The placeholder sprite would have all the events..

    Another way that comes to mind is putting all sprites in a family and having the events on the family..

  • so you are setting the angle to aim at to the angle between mouse.x,mouse.y and mouse.x, mouse.y , this deems strange, because what is the angle between the same coordinates?

    why not just set angle towards mouse.x,mouse.y?

  • tublood, ofcourse we have and we have never had many issues with it..

    If you could share your capx or at least your events we might see where things go faulty..

    The two most common mistakes are:

    • pinning every tick instead of once with a triggered event..
    • setting the position of object1 to a position relative to object2 before chanching the position of object2 in the same tick

    if these don't apply helping without having a look at your events is almost impossible..

  • Use:

    sprite1.imagepointx(1), sprite1.imagepointy(1) sprite2.imagepointx(2),sprite1.imagepointy(2)

    To get the x and y values of the imagepoints..

  • Everybody learns in a different way, so I can't really give advise..

    I myself learned (and still learn) by reading a lot in this How do I section, also topics that have nothing to do with what I'm working on..

    Lots of trial and error and searching for solutions on the forums, putting events together from different things I read..

    Other people learn best by looking through tutorials and this site has a lot..

    Also there are many on youtube..

    And others again learn from dissecting capx's made by other people..

    This forum, the examples shipped with construct and the capx tutorialsection is a good place to start for them..

  • Just put the origin of your bar on the left..

    If you use tiled background this should be the standard place..

  • No prob.. Glad you got it working with some tweaking of your own..

  • set the layer to force own texture and set the opacity of the layer as wanted..

  • I'm not familiar with blacktoalpha, but couldn't you just add a layer with a round sprite and set the layer to destination out?

  • Eventsheets can be copied, but only after all objects, plugins and global variables have been copied..

    names of layers should be the same too ofcourse..