Status Effect Duration

0 favourites
  • 4 posts
From the Asset Store
A total of 214 high quality and unique magic sound effects suitable for RPG, Battle Arena and more!
  • i have a turret that will spawn 2 types of bullets

    1st bullet will make the enemy hit into gaining "Z" status for 4 seconds

    2nd bullet will make the enemy hit into gaining "A" status for 3 seconds

    now :

    if the enemy has no "Z" status when the 1st bullet collided with the enemy, the enemy will gain "Z" status

    if the enemy ALREADY has "Z" status, then the duration will be refreshed into 3 seconds again (for anyone playing DOTA should understand, i meant to use 'orb effect' kind of thing)

    if the enemy is hit by 2nd bullet, while ALREADY having the "Z" status, the status will simply add into "Z|A|", which means the enemy is AFFECTED by both effect.

    dropbox.com/s/o73eymclbvu6p68/TestEffect.capx

    i already made the whole 'not stacking' effect.

    but i can't add the duration <img src="smileys/smiley19.gif" border="0" align="middle" />

    can anyone make so that A status will be gone after the enemy is NOT hit by the 2nd bullet for 3 second, and so Z status will be gone after the enemy is not hit by the 1st bullet for 4 seconds?

    and if able, the duration will be refreshed to 3 or 4 (based on the effect) if the enemy is hit again.

    thanks <img src="smileys/smiley1.gif" border="0" align="middle" />

    --

    ah, if able, i would like for all the status effect to be placed on a string, so if i wanted to add more effect, i don't add an instance variable. well, if able @

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi I added some animations to see if a, a, a and z, or none are true.

    Didn't use a string though, for using booleans seems like an easier way.

    testeffect-littlestain

  • LittleStain

    ah, to check on opponent's current status, just clik on the sprite.

    and to change the bullet, click on the turret

    sorry i missed to explain that ~_~

    anyway, can anyone do this? i've tried to use a timer, still doesn't work so well.

    to be exact, i am unable to find the certain String that needs to be replaced by ""

    i can't make the string to "", because that will reset ALL status that is currently applied on that unit.

    i need to find the correct status(for example "Z|") then exchanging the "Z|" into ""

    so if opponent currently is affected by

    "A|Z|"

    it will become

    "A|" (the | is for separator)

    is there a way to find the "Z|" on the string, then replace it

    ---

    using replace and timer does well @, took me few hours to get it done <img src="smileys/smiley7.gif" border="0" align="middle" /> (i first uses 'wait', but it went buggy as it does not refresh the duration like i wanted it to be)

  • What is it that doesn't work right in my example?

    The timers are working correctly, as you can see from the animations I added.

    I didn't try to create your string variable for I couldn't see the benefit if you are going to have to check it for all booleans and combinations thereof anyway.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)