• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Activate acondition in a script?

TCArknight

Well-known member
Is there a way to activate a condition, in this case Concealment (pstConceal), with a script?

I tried this on a custom ability at Preattributes/1000:
Code:
if (field[abilActive].value <> 0) then
   ~Activate Concealment condition
   perform hero.childfound[pstConceal].assign[Helper.CondActive]
   hero.childfound[pstConceal].field[pIsOn].value = 1
endif

But that gives me an error about only derived fields can generally be modified.
 
Is there a way to activate a condition, in this case Concealment (pstConceal), with a script?

I tried this on a custom ability at Preattributes/1000:
Code:
if (field[abilActive].value <> 0) then
   ~Activate Concealment condition
   perform hero.childfound[pstConceal].assign[Helper.CondActive]
   hero.childfound[pstConceal].field[pIsOn].value = 1
endif

But that gives me an error about only derived fields can generally be modified.

There's not a good way to do it from that direction. However, if you take a look at the Barbarian Rage ability, it turns on Fatigue with this:

Post-levels 10000
Code:
perform hero.assign[Condition.pcnFatigue]

I condensed the code to just highlight the pertinent part. You can probably use something similar for what you're doing.
 
thanks!

That looks like it works, it just doesn't check the box on the condition. I see everything ok otherwise...
 
Back
Top