[behavior] rex_buff

0 favourites
  • 11 posts
From the Asset Store
Skin it
$20 USD
A skin plugin and behavior to add a skin system in your game.
  • Document, plugin and sample capx are include.

    A variable which supports buffs. Get sum from base value and buffs.

    For example, property "ATK" = base value + weapon buff value + item buff value ....

  • Hi rexrainbow, I get a crash when I use this behavior in combination with the official Keyboard plugin.

    A .capx is attached.

    Here is an image of the crash and the console output in case you dont get the bug.

    construct2 r197 (64bit)

    win8.1 (64bit)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks! I had fixed it. Please try again.

  • rexrainbow

    Wow, that was quick.

    Everything works now, thank you !

  • Holy crap I was actually just thinking of implementing something like this when I stumbled here. Thanks Rex!

  • Hi

    Either I don't understand how the priority of buffs work or they are broken.

    NR1 Expected result when priority is bigger or equal 0 :

    • 1st time Button A is released ===> (sum = previous result of sum+buff) ===> 11(sum) = 10(previous sum) +1(buff "HP UP")
    • 2nd time Button A is released ===> (sum = previous result of sum+buff) ===> 12(sum) = 11(previous sum) +1(buff "HP UP")

    11,12,13,14,15,16... and so on

    NR2 Expected result when priority is less then 0 :

    • 1st time Button A is released ===> (sum = base+buff) ===> 11(sum) = 10(base) +1(buff "HP UP")
    • 2nd time Button A is released ===> (sum = base+buff) ===> 11(sum) = 11(base) +1(buff "HP UP")

    11,11,11,11,... and so on

    But in both cases I get the result of NR2

    Is the Behavior broken or do I expect the wrong results ?

    Thanks in advance

  • This behavior will count the sum starting from "Base" which set in properties table. So that the sum of each time will be the same.

  • Hey, rexrainbow

    I'm getting an error when I try to change layouts after adding a buff to a buff behavior. I've got no idea what's going on.

    I managed to recreate the error in a blank project. I clicked one sprite to add a new buff, then I clicked the other to move to another layout; but I get an error instead of moving on.

    The error

    Javascript error!
    Uncaught TypeError: Cannot set property 'plugin' of
    undefined
    http://localhost:50000/Rex_buff_behaviour.js, line 40 (col18)[/code:qlw84dhp]
  • KieronGryph

    Could you provide a simple test capx for this case?

  • rexrainbow

    I can't figure out how to post attachments around here, and it won't let me post links to it.

  • rexrainbow

    I used your buff - basic example capx, and made a new sprite that when clicked moves to a second layout. I get the same error as before.

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