Making it so enemies fight with you instead of against you.
-
Emera Nova
- Posts: 146
- Joined: Wed Jun 11, 2014 1:31 am
Making it so enemies fight with you instead of against you.
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
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/
The hook resource:
https://sites.google.com/site/jkoslog2/
-
Emera Nova
- Posts: 146
- Joined: Wed Jun 11, 2014 1:31 am
Re: Making it so enemies fight with you instead of against y
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
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.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
-
Emera Nova
- Posts: 146
- Joined: Wed Jun 11, 2014 1:31 am
Re: Making it so enemies fight with you instead of against y
How would you tell the monster to attack other monsters and not the playerminmay 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.
Re: Making it so enemies fight with you instead of against y
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).
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.