[behavior] rex_buff

Post your work in progress addons and get feedback

Post » Mon Aug 04, 2014 2:53 am

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 ....
B
108
S
26
G
260
Posts: 4,434
Reputation: 146,191

Post » Sun Feb 22, 2015 2:53 pm

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)

Image Image
You do not have the required permissions to view the files attached to this post.
B
68
S
28
G
7
Posts: 85
Reputation: 7,496

Post » Sun Feb 22, 2015 4:29 pm

@EpicPixel

Thanks! I had fixed it. Please try again.
B
108
S
26
G
260
Posts: 4,434
Reputation: 146,191

Post » Sun Feb 22, 2015 4:42 pm

@rexrainbow
Wow, that was quick. :)
Everything works now, thank you !
B
68
S
28
G
7
Posts: 85
Reputation: 7,496

Post » Tue Feb 24, 2015 5:39 pm

Holy crap I was actually just thinking of implementing something like this when I stumbled here. Thanks Rex!
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Mon Aug 17, 2015 12:28 am

Hi @rexrainbow.

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

Image
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
B
68
S
28
G
7
Posts: 85
Reputation: 7,496

Post » Fri Aug 21, 2015 2:56 am

@EpicPixel

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.
B
108
S
26
G
260
Posts: 4,434
Reputation: 146,191

Post » Sat Sep 26, 2015 6:18 pm

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
Code: Select all
Javascript error!
Uncaught TypeError: Cannot set property 'plugin' of
undefined
http://localhost:50000/Rex_buff_behaviour.js, line 40 (col18)
B
5
Posts: 3
Reputation: 243

Post » Sun Sep 27, 2015 1:33 pm

@KieronGryph

Could you provide a simple test capx for this case?
B
108
S
26
G
260
Posts: 4,434
Reputation: 146,191

Post » Sun Sep 27, 2015 1:59 pm

@rexrainbow

I can't figure out how to post attachments around here, and it won't let me post links to it.
B
5
Posts: 3
Reputation: 243

Next

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests