Greaver's Recent Forum Activity

  • Ninja'd, but anyway:

    To get 20% of something, you multiply it by 0.2 (that is 20/100).

    So assuming I understand, if damage is 60, but you want to reduce it by 20%, 60 * 0.2 = 12, so 60 - 12 = 48 (adjusted damage). What was being pointed out above, is that you can do it simpler by multiplying by 100%-20% = 80%. So 60 * 0.8 = 48.

    Hey i dont understand what he is trying to say honestly, maybe u can help? ^_^

    I know the counting but i cant use the above to get the code.

    Health = 150

    Damage = 60

    Armor = 20

    So the code is, when hit, *Substract from Health* = ?? what? How to do it using variables of the above?

    Becuase if armor was 0.2 instead of 20, then using = Damage * Armor - Damage will become a negative number.

  • round(value / value) * 100

    round(55 / 80) * 100 = 69%

    Im sorry what? That explains nothing... Like seriously i know u guys trying to help but ur not making sense at all.

    My Code is, ''Substract From ''Health''; Damage - armor''

    Health = 150

    Damage = 60

    Armor = 20

    I want the code above to deal 60 dmg - 20% (armor.)

    I cant make it a constant 20% since armor will vary..

  • [armor] - [dmg] * multiplier

    Set the multiplier to 0.2 to only use 20% of the damage.

    Use 0.5 to use 50%.

    Im sorry what? That does not make any sense to me, sorry.

    Basically when Player is in colission with bullet -

    Subsctract Damage - Armor from Health

    If armor is the value of 20, i wanna turn it into 20%

    So if Damage is 100, it should be 100-20% = 80 dmg from health

  • Greetings there! ^_^

    So i am designing an armor system as a string value. When being hit, i want to reduce the dmg by the value of the armor in %

    • Let's say damge is 50 and armor is 20, i want the damage to be reduced by armor in % and not flat out 20.

    Is there some way to do this?

    Player in collission with Bullet, substract from player health 20-Player.armor (this will be flat out 20, but i want the 20 to be %, how to do this?)

    Thanks in advance!

  • The listener object is usually the player sprite. You place the positioned audio on the object where you want the sound to come from. For example, if you have an explosion, you can place the sound to the explosion. Then the closer the listener object (player) is to the explosion, the louder it will be. Of course it's not just the volume, if the explosion is to the right of the player, it will be heard in the right speaker etc.

    Edit: By the way, there's an example capx that comes with construct 2 in the example files. If you haven't already, you might want to take a look at it.

    Oh i see, thanks for that - But, i just want the sound to be louder or lesser depending if ur close or not. For example rain-sound to be louder if ur closer to the window, and lesser if u walk away from it, but the listener doesnt seem to do anything.

    Also its not about right or left speaker, its just about the how loud it plays when ur closer. No matter what i do or how i follow the tutorial, the sound/music plays at same height.

  • Greaver First, don't forget to set a listener object (like the player sprite for example) at the start of the layout. Then you add the positioned audio. Also, there are settings in the audio properties bar that you may need to adjust as well.

    Hehe hey, sorry but the more i read about it the more confusing it gets! Listener should be on the player? Also on the object playing the sound or?? Makes no sense so far

  • Have you checked if "Advanced audio supported"?

    Hey sorry but what is that? Where can i find that? ^_^

  • You can use the Audio "Play at Object" action in the Advanced Audio sub options

    Yes but the sound remains the same, no matter how far away that object is.

  • Nobody knows?

  • Greetings there! ^_^

    So i'm trying to play a sound at an object with (Let's say an orb) and i'm trying to decrease the sound as the player walks further away from the orb. As if it really is playing from the orb and not in 'general'.

    Any help? I have many sound FX that are to be used like this, and manually increasing/decreasing it seems a bit too much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • (If "Hero" is in line of sight) - "X" set speed 1000

    - "X" rotate towards position "Hero.X" "Hero.Y"

    These comands will be repeated each tick the Hero is in the line of sight of the bullet.

    I don't know how to detect line of sight, but the rest should work

    Line of sight is fine, but i cant get the rotation, what u mentioned, the bullet moves only left or right, so if the Hero jumps, it will go under and pass lol.

    Basically, i want when 'Hero is in line of sight' (works fine) - Get object X to move towards Hero. Maybe bullet is not the right way? So far the bullet has 0 speed, but when it has 'line of sight' of Hero, the bullet gains 1000 speed to move rapidly to the Hero, but it keeps going left and right, i cant get it to 'follow' the hero.

  • Greetings there! ^_^

    So basically, i want; - When Hero is in line of sight of X - (X is bullet with 0 speed currently) - then set speed to 1000 and 'shoot' towards Hero. Whether Hero is behind or in front, it should shoot towards the Heroes position.

    Whether the Hero is jumping or ducking, it should always aim at the Hero. When i set its angle of motion towards Hero, it keeps going to the right?

    So how to do this?

    Thanks in advance! ^_^

Greaver's avatar

Greaver

Member since 5 Apr, 2013

None one is following Greaver yet!

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Email Verified

Progress

13/44
How to earn trophies