lionz's Forum Posts

  • Nice, good luck with it :)

  • Yes it's all possible. You can play any animation and sounds based on a trigger in gameplay. You could even test out small scenarios on the free version before you buy it.

  • > Every tick : set health.animationframe to global variable. You pick it from the object, set frame.

    Use "Every tick" is not a wise option.. just IMHO. it is unnecessary use

    It is like force the CPU doing something every tick change the animation frame which is useless if nothing change. So I think that is not a good programming design

    pilpgam

    That was just used in response to how to set a global variable as the knowledge of op seems like beginner. If you look in my original post to the question you will see how I put 'on hit' adjust health which would be a trigger. Also I think my example is better as it accomplishes everything in one event, where the animation frame number matches the global variable. Aside from that, setting an animation frame every tick has minimal effect, you must be thinking of text.

  • Add an instance variable to the object that you also add 1 to, and say if object is clicked and instance variable less than 5, add 1 to global variable.

  • I can't see your game but would disabling collision on the gun object resolve it?

  • Every tick : set health.animationframe to global variable. You pick it from the object, set frame.

  • Have a global variable for health set to 3 by default.

    When hit subtract one from global variable.

    Set health bar animation frame to global variable.

  • For direction you need something like ;

    mouse.x < player.x , player set mirrored

    mouse.x > player.x , player set not mirrored

    For the aiming towards cursor, you shouldn't be rotating the player object, there should be a separate object that aims like just his arm or something.

  • Are you using artwork for the turret? Possibly the artwork isn't facing the same way as the turret object so it simply looks like it isn't facing the player. It's a possibility if you're saying it is 90 degrees off.

    Objects in layout face to the right (angle 0) by default, so if your artwork is facing down the layout then it wouldn't look like the turret was facing you even though it is.

  • Wow, this looks amazing! Does it play like Wolfenstein as well? (I am too lazy to download all the plugins required)

  • Rotating the object in the layout changes its starting angle and the direction it is facing, that will be the focus for you. You can adjust the animations separately from this.

  • Even though your smiley face image starts upright, the actual angle of the object is 0 so it's facing to the right. Open the image editor and rotate the image until the smiley face is facing to the right. In game it will then look correct. The angle of the object is what you're interested in for the direction that the object is facing.

  • In its basic form something like, on touched turret, set a global variable to turret.UID

    Then the last selected turret can be picked from this value.

    On upgrade 1 selected, pick turret where UID = global variable, set turret.variable to 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From what I can work out, those upgrade sprites don't relate to the turrets. For levels of upgrade you should be using an instance variable on the turret and setting it to 1,2 or 3 etc. Then you say if turret.variable=1 make it do such a thing. If you're using a menu to do this fair enough, but you cannot then reference that menu later on as though it relates to the turret.

    When you select the turret you need to identify it with some ID variable as the one picked, then when the menu option is chosen, it picks the turret with that ID and sets the upgrade variable to 1,2 or 3.

  • maxrpg123 read the latest blog post, it was posted after you started this topic.

    construct.net/en/blogs/construct-official-blog-1/launching-the-new-construct-3-runtime-1048

    "So we will keep maintaining the old runtime for the foreseeable future. We advise that wherever possible you switch over to the C3 runtime though, since we cannot guarantee it will still be supported in the long term."