Page 1 of 1
Making it so enemies fight with you instead of against you.
Posted: Thu Apr 02, 2015 3:27 pm
by Emera Nova
Looking to make it so you are able to have an past enemy be a help in a fight against a boss, what would I need to do scripting wise to make it attack something other than the party and for the boss to also fight it as well as the party?
Re: Making it so enemies fight with you instead of against y
Posted: Thu Apr 02, 2015 5:26 pm
by Azel
Assume you will need some Brain hooks there. I think JKos is doing that with a Charm Monster spell.
The hook resource:
https://sites.google.com/site/jkoslog2/
Re: Making it so enemies fight with you instead of against y
Posted: Thu Apr 02, 2015 6:52 pm
by Emera Nova
O-O took a look at the hook stuff and my god does it seem confusing.. xD Not having coded before makes stuff like this seem so impossible.. Think I may have to just scrap the idea for now.
Re: Making it so enemies fight with you instead of against y
Posted: Thu Apr 02, 2015 9:46 pm
by minmay
You don't need the hook framework to make a custom brain, you can just put your think function as the onThink() hook in the monster definition.
Re: Making it so enemies fight with you instead of against y
Posted: Fri Apr 03, 2015 2:15 am
by Emera Nova
minmay wrote:You don't need the hook framework to make a custom brain, you can just put your think function as the onThink() hook in the monster definition.
How would you tell the monster to attack other monsters and not the player

Re: Making it so enemies fight with you instead of against y
Posted: Fri Apr 03, 2015 2:29 am
by minmay
If it's a projectile attack, just have the brain perform the corresponding action. If it's a melee attack you'll have to change the animation events and/or onAttack hook to imitate a melee attack against the other monster in some way, since monsters won't actually hit other monsters with melee attacks. It's probably easiest to spawn an invisible fragile projectile inside the other monster's capsule, since that will take care of accuracy, damage including armor, and damage/miss messages. Figuring out the capsule's position could be problematic, though (as in, I don't know if it's actually possible).