Neil_G's Forum Posts

  • 9 posts
  • I think that was it. Now working!

    Thanks DiegoM

    Neil

  • Hi,

    I've been recently adding some timelines and have noticed when I'm in editing mode, the "edits" aren't applying. e.g. if I move an object on a keyframe, I get a green line to indicate the move should be registering, but then nothing happens. The only way I can currently get timeline changes to take effect is by manually updating properties on a keyframe, e.g. selecting the "X" value and typing in a number.

    I didn't used to have this issue, so may be missing something. Has anyone else had this issue or know how to resolve?

    Thanks,

    Neil

  • Hi Cogote,

    It looks like the damage dealt is the subtraction you're making on line 2 to the Zombie. Perhaps it would be better to set a variable first e.g. "DamageDealt" with this value "random(5,10)". You can then use that value to subtract from the Zombie HP and also then use this variable to set your text which appears. In that case you could just put "DamageDealt" into this box once you've declared that variable.

    Neil

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Excellent, it worked... but I omitted a detail that I forgot to ask... How do I display a text when the bullet hits the enemy? That is, to show me the damage done to the enemy... I forgot how to do the event :C

    Hi cogote,

    Assuming the application here is text appearing above each enemy that has been hit. I would:

    1) Create a new text object in the game if you haven't done so already.

    2) Put the enemies into an "Enemy" family. Assuming multiple enemy types, this will make it easier to pick them all later.

    3) Use the "On collision with another object" event trigger when the bullet hits the enemy family.

    4) Add the "Spawn another object" action for the enemy family to spawn an instance of the text object created earlier. Assuming you have different enemy types, you might wish to set this to a specific image point, so you can adjust the location of the text per enemy.

    5) Finally, set the text to the damage done value. Depending on the application, this may be a static number, a variable in the object or a calculation. E.g. you could first subtract the value of the bullet damage away from the HP on the enemy and show this value.

    Hope this helps

    Neil

  • Hi cogote,

    You could use a formula to return the EXP level, which in this case would be:

    (25+25/LEVEL)*LEVEL

    eg.

    (25+25/1)*1 = 50

    (25+25/2)*2 = 75

    and so on.

    Neil

  • Thanks Radkampfwagen,

    That's given me a couple of ideas - I hadn't thought about using the Z-Order to just "hide" some fragments of the sprite on a lower layer which might be an interesting workaround.

    It feels like there should be a way to do it using the combination of blend modes available. However what I have tried so far seems to not allow for transparency on the layer being masked.

    Neil

  • Sorry thought I was embedding a GIF there. link below!

    jumpshare.com/s/1Dr58jurTt5IUtGoImQg

  • Or did you mean for the hidden object to immediately appear as soon as the player passes the mouse over the background?

    If this is what you wanted →

    Mouse on collisions with BG → set HiddenSprite Z order to top(or you could set visibility or destroy an object that will be over the hidden mask)

    Tell me if this works,

    Radkampfwagen

    Hi xRadkampfwagen

    Thanks for the reply! So I've made a gif which should better explain. Essentially I want to be able to paint a mask which reveals a hidden layer. The "painting" mechanic is straightforward as I can spawn some sprites on a layer to act as the mask. However the bit I can't figure out is how to have a transparent layer reveal (i.e. the smiley face in the gif below) reveal as I paint the mask.

    	<html>
    		<body>
    <div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe id="js_video_iframe" src="https://jumpshare.com/embed/1Dr58jurTt5IUtGoImQg" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>
    		</body>
    	</html>
    
  • Hi!

    I was looking to achieve something with a mask and wondered if someone could please advise the best way forward.

    Essentially, i'm trying to create a hidden layer, which is "revealed" when the user adds to the mask with a brush-like tool. I've been experimenting with different blend modes and can't seem to get an option which handles transparency in the way that I need. The effect should be it looks like there is nothing on screen until the user mouse passes over it, effectively "painting" in the mask.

    Hope this makes sense, please let me know if any more detail is needed. Thanks in advance for any assistance.

    Neil

  • 9 posts