Hello,
I’m creating a fps game. I have script EnemyDamage which notify when enemy is hited. I would like to change value of variable gotHit in this script when enemy is taking damage to stop move animation. I created Behavior Tree witch constraint gotHit. I aded variable gotHit in basic memory. And my problem is that I cant change gotHit variable in EnemyDamage script. I tried to do it like in this tutorial:
but in this tutorial they are using RAIN{Indie} and I’m using Rain.
I created this script but it is not working:
`import RAIN.Core;
var ai : RAINAgent;
ai = gameObject.GetComponent.<RAINAgent>(); / there is problem I think because in RAIN this script is named AIRig
// when enemy is taking damage do this:
ai.Agent.actionContext.setContextItem.<float>(“gotHit”, 1);`
Thanks for help
This topic was modified 2 years, 1 month ago by azorek.