SnpM / LockstepFramework

Framework for lockstep RTS, TD, and MOBA games.
MIT License
1.39k stars 348 forks source link

How can I add ability to agent during runing time ? #153

Closed DogsLike closed 6 years ago

DogsLike commented 6 years ago

if my agent get a medkit. I want my agent get heal ability. How can I do it?

SnpM commented 6 years ago

Hey DogsLike. Modify the Health ability by calling:

LSAgent agent: agent.GetAbility().TakeDamage(-HealAmount)

I'll make a function that's more intuitive but taking negative damage is the equivalent of healing at the moment.

On Thursday, June 21, 2018, DogsLike notifications@github.com wrote:

if my agent get a medkit. I want my agent get heal ability. How can I do it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SnpM/LockstepFramework/issues/153, or mute the thread https://github.com/notifications/unsubscribe-auth/AHXqp1D3RhOiuzDJ_FyoPEss_6P2uNCEks5t-2_LgaJpZM4UxxQC .