Page 1 of 1

Auto-disarm to cast

PostPosted: Mon Dec 22, 2003 8:27 am
by SDonald
Drocket,
I thought I'd check with you before I gave up on this.

I wanted to have autodisam of a weapon if the player tried to cast. Unfortunately it appears if you cast from the spellbook the core does an automatic blocksCastingIfInHand check in the itemdesc file before the script is run.

Can you think of a way around this?

Regards,
Stephen Donald.

PostPosted: Mon Dec 22, 2003 8:39 am
by SDonald
Maybe make blocksCastingIfInHand 0 for all weapons and make it a cprop in all the itemdesc entries and then edit FreeHands function in magic.inc to search for a cprop of the renamed entry. (and manastone.src too!)
That way the core never even gets to check it.

Bah.. sorry to think out loud.... :)
I think I will try this!

PostPosted: Mon Dec 22, 2003 10:25 am
by Drocket
Yep, that should work. Or you could just wait for POL 0.96 :)

One thing, though: I don't think you mean add a CProp, because that would put the property on all the items in the world, wasting a lot of RAM. You probably just want to add an itemdesc.cfg entry. That's probably what you mean, though.

PostPosted: Mon Dec 22, 2003 11:28 am
by SDonald
Thanks... well yes it did work.
I had edited my reply to myself a few times, it's a wonder it made sense at all.
Testing for those inevitable unexpected side-effect now.
I regret posting before I thought about it now!

096 will have to wait. My custom map has too many issues converting it.


Regards,
Stephen Donald.