farsen's Recent Forum Activity

  • Ah, single plings!

    It works, thanks alot

  • Hi.

    I can easily call some javascript on the page the game sits in, if I only call the function with integers. I´ve tried different ways of formatting the call, but none seems to help, and no error is thrown.

    This works:

    "parent.test(" & totalScore & ");"[/code:48855qcr]
    
    This doesent:
    [code:48855qcr]"parent.test(currentPlayer, " & totalScore & ");"
    "parent.test(" & currentPlayer & ", " & totalScore & ");"[/code:48855qcr]
    
    currentPlayer is a string, and totalScore is an int.
    
    What am I doing wrong?   
    
    Thanks alot
  • Hi again.

    I solved it but putting a system - every 1 seconds on the event. So now it is only firing once.

    Thanks for your help!

  • Hi dop2000

    Maybe the "talking" animation continues to play from the previous time when talkingStatus was 1? You never reset the animation. Shouldn't you add something like "Set animation to Idle" to event #6 or #7

    - Well I set the talkingStatus to 0, so the event #4 takes care of setting the correct animation. And as said, if I dont care about the "random silence" and only use 0 and 1 in taskStatus it works just fine.

    [quote:1xyq736q]Also note, that if you have multiple pvtagt instances, event #7 will reset talkingStatus for all of them.

    • Good point thanks. (Not that it influcences this specific problem though.

    [quote:1xyq736q]And the "enemyTalking" variable is not needed, you can use Audio -> Is playing "pvagt"

    • I have multiple enemies talking and I dont want them to talk at the same time, so thats why I have this variable

    The problem seems to be the LOS which fires an enormous amount of times and then triggers the audio before the enemyTalking and talkinStatus variables are set.

  • Hi kriand

    Thanks alot for your answer!

    I´ve tried to implement your idea which seems to work great! (I´ve sticked with the line of sight though).

    But I seem to have a problem I dont quite understand. See it works just fine if the character should just keep on talking when I´m near it. But there should be some idling time if the choose hits the number 2. So therefore I create an event saying if the talkStatus is 2, I wait a little, set talkStatus to zero and then the main event can trigger again. But this messes up the talking animation which now plays randomly it seems, and I cannot understand why.

    I´ve also tried to play an empty 2 seconds file when the talkstatus is 2, but no luck here either.

    Can you see what I might be doing wrong? Or point me in another direction?

    Thanks

  • Hi.

    I would like to "sometimes" play a random enemy sound when I am near an enemy in this 2d platform game. I am the 'playerbox', and the enemy is the 'Pvagt'.

    With sometimes I mean like 50% of the times I am near the enemy, or else it would be too annoying.

    I´ve come to this event setup, but the problem is when I play the empty sound the character´s mouth is moving (the 'Talking' animation).

    So what is a good approach to this behavior?

    Thanks alot!

  • Oh, so the bullet speed increases automatically...

    But amazing,it works, thank you so much!

  • Thanks alot for your answer!

    Well I´ve tried to disable it again after I respawn, but the problem remains the same. This is my event:

    Any idea? :/

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Uuuhm... one more question!

    The first time this die animation plays, it is perfect. But when I respawn the player (by setting the player´s X and Y and resetting it´s health), and the player dies again he get´s shut off with a high speed in top of the layoyt. It´s like if the bullet has not been reset. I´m disabling the bullet after the animation.

    If I use the System > Restart layout, the animation plays fine the second time, but I cannot do that because of game state issues.

  • EXACTLY what I was looking for. Thanks!

  • Hi.

    I have a 2d platformer with a character that has a sine death animation - very mario-like. This works great as long as the character dies on the "bottom" of the layout. But when the character has jumped up on some platforms and dies there, the sine animation isnt suitable because it doesnt go all the way to the bottom of the screen. I´ve tried playing around with the sine settings, but can´t find anything that works in general everywhere on the layout. I cant find any tutorials or alike that covers this subject.

    Maybe sine isn´t the way to go?

    Hope you can help

    Thanks!

  • Doh, sorry! Of course!

    Thanks alot for helping with my blindness

farsen's avatar

farsen

Member since 16 Oct, 2017

None one is following farsen yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies