Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Afraid of fire?

Robert Lee

Villager
Xy$
0.00
Hi all.

I have a feature that I would like to implement and I am not sure if it can be done without having to resort to writing a JavaScript Plugin. The feature is as follows.

I have a fire based spell called FLASH which does 1HP of damage. With only 1HP of damage it is unlikely to kill anything! but what I would like is for certain wild animals who are afraid of fire to say have an 80% chance of simply running away. That would make it a handy spell to have around as it is very cheap to cast.

I understand how to make things vulnerable to fire, but this simply increases the damage they receive; it doesn't trigger other behaviour: such as running away.

Has anybody implemented anything similar to this and solved it without recourse of a special plugin.

Thanks in advance for any help and suggestions.

Bob
 

Cunechan

∠( ᐛ 」∠)_
Isn't there in normal attack settings something like "x% of state y when used" or does it need to be for special enemies? Idk how to do that with JavaScript but I'm scared of fire
 

Robert Lee

Villager
Xy$
0.00
Isn't there in normal attack settings something like "x% of state y when used" or does it need to be for special enemies? Idk how to do that with JavaScript but I'm scared of fire
I only want to effect certain wild animals, if I give the attack a trait as you say of "x% of state y when used" that will effect everyone attacked by the spell. Not what I want.
 

Tyrfang

Villager
Xy$
0.00
Using state is a good idea, still. You could design your ennemies except wild animals to be immune to that state (say, FireScared). And in their strategies, you can make them run away if they are under a given state. Just set the chances of the spell to apply FireScared, and Voilà!

Note: you wouldn't have 100% chance of having the animal to run away. But by tweeking the priorities, "run away [if affected by FireScared]" to 10 and the other(s) to 1, you could have something satisfying.

I didn't test it, but I think this could work fine.
 
Top