MegaGlest Forum
Archives (read only) => Glest Advanced Engine => General discussion => Topic started by: geork on 28 October 2011, 23:59:46
-
Hey all!
Umm, I've mucked around with effects a bit, but they never seem to do anything! I have an ability called "shred" for the battle machine (using old models for now), which is supposed to deal 20 damage/sec for 3 seconds and stun both victim and unit, so I figured I'de try this:
<skill>
<type value="attack"/>
<name value="attack_shred"/>
<ep-cost value="0"/>
<speed value="90"/>
<anim-speed value="90"/>
<animation path="models/battle_machine_attacking.g3d"/>
<sound enabled="true" start-time="0">
<sound-file path="sounds/machine_attack1.wav"/>
<sound-file path="sounds/machine_attack1b.wav"/>
<sound-file path="sounds/machine_attack1c.wav"/>
</sound>
<attack-strenght value="20"/>
<attack-var value="0"/>
<attack-range value="1"/>
<attack-type value="slashing"/>
<attack-fields>
<field value="land"/>
</attack-fields>
<attack-start-time value="0.8"/>
<projectile value="false"/>
<splash value="false"/>
<effects>
<effect name="shred" bias="detrimental" stacking="stack" target="any" chance="100.0" duration="3" image="image/battle_machine.bmp">
<static-modifiers>
<hp-regeneration value="-20"/>
</static-modifiers>
<multipliers>
<movement-speed value="0.0"/>
<attack-range value="0.0"/>
<attack-strength value="0.0"/>
</multipliers>
<recourse-effects>
<effect name="stand" bias="beneficial" stacking="stack" target="any" chance="100.0" duration="3" image="image/battle_machine.bmp">
<static-modifiers>
</static-modifiers>
<multipliers>
<movement-speed value="0.0"/>
<attack-range value="0.0"/>
<attack-strength value="0.0"/>
</multipliers>
</effect>
</recourse-effects>
</effect>
</effects>
</skill>
I wouldn't usually put the WHOLE THING in, but I don't know where the problem is :S the unit does it's attack animation, but then nothing happens - no one stands still, and the enemy only takes initial damage (from the attack). i'm using the 0.4 beta 2. any advice?
thanks
-
Hi geork.
In the effect node, target="any" should read target="all".
In the multipliers node, <movement-speed value=.../> should be <move-speed .../>
Multipliers of 0 are not recommended, units will freeze up for longer than expected due the nature of how the game works, obviously this is not ideal and completely freezing a unit for a set time would be nice, but for now you'll have to live with it.
Reducing attack-range is also not recommended, a unit with range = 1 will end up with fractional range and will be a close as he can be and still not attack...
Here's a working version with a few things changed, (because they 'stack' you will still get the freeze up problem with this, it'll just take a little while to build up).
<effect name="shred" bias="detrimental" stacking="stack" target="all" chance="100.0" duration="3" image="image/battle_machine.bmp">
<static-modifiers>
<hp-regeneration value="-20"/>
</static-modifiers>
<multipliers>
<move-speed value="0.5"/>
<attack-speed value="0.5" />
<attack-strength value="0.5"/>
</multipliers>
<recourse-effects>
<effect name="stand" bias="detrimental" stacking="stack" target="all" chance="100.0" duration="3" image="image/battle_machine.bmp">
<static-modifiers>
</static-modifiers>
<multipliers>
<move-speed value="0.5"/>
<attack-speed value="0.5" />
<attack-strength value="0.5"/>
</multipliers>
</effect>
</recourse-effects>
</effect>
</effects>
-
ahh cool, that's solved it, thanks :)