Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
FLARE [ARCHIVED]

Unexpected behavior in flare-engine?

TakeAShower
Tuesday, April 30, 2019 - 08:58

I'm trying to implement a simple combo system in flare-engine. However, the following code does not work as expected. The delay before the combo runs out is supposed to be shorter than 2s, however, if the first combo status effect runs out, then the player's combo is broken. What's supposed to happen is each power, on a succesful hit, replaces the base power with the next version of the combo, making each successive attack stronger. How would I do that?

[power]
id=14001
name=Combo Punch
type=fixed
buff=true
icon=31
description=Basic melee attack.
new_state=swing
face=true
use_hazard=true
base_damage=hand
radius=1.0
starting_pos=melee
aim_assist=true
modifier_accuracy=multiply,125,0
post_effect=combo_2,100,2s
replace_by_effect=14101,combo_2,1
script=on_cast,scripts/powers/combo_2.txt

[power]
id=14101
name=Combo Punch (2-hit-combo)
type=fixed
buff=true
icon=2
description=Basic melee attack.
new_state=swing
face=true
use_hazard=true
base_damage=hand
radius=1.0
starting_pos=melee
aim_assist=true
modifier_damage=multiply,125,0
modifier_accuracy=multiply,75,0
post_effect=combo_3,100,2s
remove_effect=combo_2,1
replace_by_effect=14201,combo_3,1
script=on_cast,scripts/powers/combo_3.txt
post_power=2001

[power]
id=14201
name=Combo Punch (3-hit-combo)
type=fixed
buff=true
icon=2
description=Basic melee attack.
new_state=swing
face=true
use_hazard=true
base_damage=hand
radius=1.0
starting_pos=melee
aim_assist=true
modifier_damage=multiply,150,0
modifier_accuracy=multiply,75,0
remove_effect=combo_3,1
post_effect=combo_3,100,2s
replace_by_effect=14201,combo_3,1
script=on_cast,scripts/powers/combo_3.txt
hp_steal=100

  • Log in or register to post comments
dorkster
joined 13 years 7 months ago
Tuesday, April 30, 2019 - 19:32
dorkster's picture

I think I see what's wrong. The second power removes the combo_2 effect, so no powers get replaced when the player casts the first again. Since the second sets the combo_3 effect, you probably want to add the following to the first (as it is in the second):

replace_by_effect=14201,combo_3,1

Is there any reason for having multiple effects versus having multiple stacks of a single effect? The latter is how I imagine a combo system being done. So in your case, the first power would have these two lines:

replace_by_effect=14101,combo,2
replace_by_effect=14201,combo,3

  • Log in or register to post comments
TakeAShower
joined 7 years 6 months ago
Thursday, May 2, 2019 - 07:02

The reason is that the combo should only run out if the player misses or stops attacking. The method you suggest means the number of combos cannot grow beyond a point, whereas I want max combo to be ~10

  • Log in or register to post comments