Monster stealing specific item and run away

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Monster stealing specific item and run away

Post by kelly1111 »

Like the title sais. has anyone given this a try? I need a monster brain that steals "torches" and then runs away with them
User avatar
Isaac
Posts: 3192
Joined: Fri Mar 02, 2012 10:02 pm

Re: Monster stealing specific item and run away

Post by Isaac »

Steals from the party? (..or just any torch on the wall , or on the ground?)
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: Monster stealing specific item and run away

Post by Dr.Disaster »

That sounds like a job for a custom monster brain and some action component experimenting.

Basically it should take BrainComponent:performAction(...) for the torch theft followed by BrainComponent:startFleeing() and BrainComponent:flee() to run off. Now the tricky part seems the specific target of the theft. The MonsterStealWeaponComponent as used by frogs will grab a random in-hand weapon so it's prolly not what you want. Maybe MonsterPickUpItemComponent supplied with a torch id held by the party?
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Monster stealing specific item and run away

Post by zimberzimber »

If you want it to steal from the party, you can take a look at the Imps code in my asset pack
If you want it to steal from objects such as torch holders or altars, follow Dr.Disaster lead
My asset pack [v1.10]
Features a bit of everything! :D
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Monster stealing specific item and run away

Post by kelly1111 »

Thanks for your quick replies. I want it to steal from the party (like the gigglers did in dungeon master)
I will have a look at your imp code zimber :)
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Monster stealing specific item and run away

Post by zimberzimber »

I assume you're focusing on stealing torches to reduce visibility for the player, but don't forget there are other ways of obtaining a light source, which might render those monsters obsolete. (Light spell, that orb that casts the light spell, something custom you might have)
My asset pack [v1.10]
Features a bit of everything! :D
Post Reply