• 0

    posted a message on Help with various speed buffs/behaviors

    There are no validators or requirements, and using that periodic trigger, I can verify that the unit both has the behavior, and that the behavior is active (whereas adding a validator causes it to return false for that second test).

    Posted in: Data
  • 0

    posted a message on Help with various speed buffs/behaviors

    In reply to DrSuperEvil:

     Well, it isn't. I apply the behavior to the unit upon unit creation (by trigger), and then I have the following debug trigger:
     
    void gt_testbs_Init () {
        gt_testbs = TriggerCreate("gt_testbs_Func");
        TriggerAddEventTimePeriodic(gt_testbs, 0.0625, c_timeGame);
    }
    
    bool gt_testbs_Func (bool testConds, bool runActions) {
        // Variable Declarations
        bool lv_hasBehavior;
        bool lv_enabledBehavior;
    
        // Variable Initialization
    
        // Actions
        if (!runActions) {
            return true;
        }
    
        lv_hasBehavior = UnitHasBehavior2(gv_gain[1], "ProximitySlowdownSlow");
        lv_enabledBehavior = UnitBehaviorEnabled(gv_gain[1], "ProximitySlowdownSlow");
        TextExpressionSetToken("Param/Expression/E03A92B9", "A", FixedToText(UnitGetPropertyFixed(gv_gain[1], c_unitPropMovementSpeedCurrent, c_unitPropCurrent), c_fixedPrecisionAny));
        TextExpressionSetToken("Param/Expression/E03A92B9", "B", FixedToText(UnitGetPropertyFixed(gv_gain[1], c_unitPropMovementSpeed, c_unitPropCurrent), c_fixedPrecisionAny));
        TextExpressionSetToken("Param/Expression/E03A92B9", "C", libNtve_gf_ConvertBooleanToText(lv_hasBehavior));
        TextExpressionSetToken("Param/Expression/E03A92B9", "D", libNtve_gf_ConvertBooleanToText(lv_enabledBehavior));
        UIDisplayMessage(PlayerGroupAll(), c_messageAreaDirective, TextExpressionAssemble("Param/Expression/E03A92B9"));
        return true;
    }
    And here it is ingame, showing that it clearly isn't working. It has the behavior, the behavior is active, but the speed is still 6 when it should be 3.
     
    Posted in: Data
  • 0

    posted a message on Help with various speed buffs/behaviors

    I'm either doing something horribly wrong or I highly misunderstand how behaviors work.

        <CBehaviorBuff id="ProximitySlowdownSlow">
            <EditorCategories value="AbilityorEffectType:Units"/>
            <Modification MoveSpeedMultiplier="0.5"/>
        </CBehaviorBuff>

     If I give this behavior to a unit, their movement speed should be halved, right?

    Posted in: Data
  • 0

    posted a message on Help with various speed buffs/behaviors

    Hi everyone, I'm really bad with the data editor when it comes to effects, behaviors, validators, etc. I was hoping I could get some help writing a simple series of behaviors that do the following:

     

    • If the target with this behavior gets within a configurable (close) distance of its caster, it gets a 20% speed penalty until it's far enough away again
    • If the target with this behavior gets too far from its caster, it gets a 20% speed boost until it's caught up

    I've tried implementing the first one myself but needless to say I've been very unsuccessful.

     

    I plan to apply the behavior with triggers ("Add Behavior").

    Posted in: Data
  • To post a comment, please or register a new account.