lamar's Recent Forum Activity

  • I have issuesa wiuthg the platformer movement. With simple events such as on key pressed player start animation y it doesn't work.

    Here's the capx file

    https://drive.google.com/file/d/0B8mfrm ... sp=sharing

    Thanks,

    Chris

    OK I am looking at your CAPX and I added in an idle command when the player is not moving and set your idle to loop and your run to loop.

    What is the Z key and X keys supposed to do?

    Is Z Duck or attack and is X Duck or attack? You have them doing both?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have the angle working, but I have no idea how I can stop the object "rotating" towards the mouse. My character has a gun and it rotates towards the mouse and the gun flips and the character gets mirrored when the mouse is either side of the character.

    The thing is, I do not want the gun to keep rotating past a certain degree, as at the moment it will clip inside the player. I want to try and have it so it only rotates along an arc of about 80° .

    Does anyone know how to do this?

    Here add this line to your Every Tick event:

    That prevents the head from rotating beyond 270 and 90.

  • I don't really want to clone these enemies because I'm not sure how many I will have on each map, I like keeping "scalability" (i don't think that's a word). All the enemies have the same behaviours and react to the player the same, it's just the waypoints and positioning are different. I suppose I could clone them and put them all into an enemy family, but is that more expensive on memory than copy and pasting?

    You can pick individual sprites by the UID and using families makes it easier to manage enemies but isn't necessary.

    I just use variables for settings I want changed or to randomize behaviors and when that sprite is created in the same event change the path finding setting directly or using variables.

    Everyone has a different way for accomplishing things. I tend to go the easy route that I know works every time lol!

  • I can't seem to find the right event to use within the angle section. I've tried different things but I'm not 100% and nothing has worked. Could you put a quick example together please?

    I looked at your CAPX but because you are using Pin To and set angle and position that interferes with trying to read the angle and keep it from going past 270 and below 40 degrees.

    I tried several things but that Pin keeps over riding it and locking the head in weird positions.

    I think you need a rotation joint and physics to accomplish what you are trying to do or use a blank sprite as a block to keep head from over rotating.

  • Instead of copying the sprite clone it and then it is a unique sprite you can set with different path finding behaviors.

    When you create sprites they can be set at the time of creation with different path finding behaviors.

    If you want some wandering add in a Sine effect.

    Upload your capx to a server like dropbox and then you can link it with URL in the forum editor.

  • A few of the fonts will look the same on any browser and system and Bookman old style is one of them. I use that for texts holding numbers so they stay put.

  • yeah they all change correctly which is why im confused that it wont work

    That is when I start putting a text on the screen for each variable in an event that may be the culprit and checking them.

    That is the fastest way I know to find the problem

  • Have you ran it in debug mode and watched your variables and conditions for change?

  • The sprites and animations can be made in any program you want or in the C2 sprite editor.

    Once you have the pieces you want you set them up as either looping or not looping and then give them behaviors to create the movement in the events.

    There are many good tutorials on creating sprites and animating them.

  • You do not have permission to view this post

  • Check that your flash and pause is long enough to be seen otherwise it will look like it is always on.

  • > % is a symbol of modulo (reminder after division) e.g. 10%3 gives 1.

    >

    > If you want to check if player's health is more than 50% you should compare this: player.health/player.maxHealth>=0.5

    >

    i want to check it in % because i might have the player max health be upgradable so 100% health could go from 100 to 150 +, etc...

    that's why.

    Use a global variabe for Max Health and one for Set Health that way you can change it as the game progresses.

    MaxHealth=100

    SetHealth=100

    On Player Collision with Enemy: Subtract 10 from MaxHealth

    On MaxHealth < SetHealth/2: Change HealthBar Sprite

    That way you can change SetHealth later in the game to a higher number and the event adjusts. When you change SetHealth make sure you also set MaxHealth to that same number to start.

lamar's avatar

lamar

Member since 11 Feb, 2014

Twitter
lamar has 8 followers

Connect with lamar