Page 1 of 1

yew staff code

Posted: Thu Feb 16, 2012 2:51 pm
by agentorangeguy
I've been coding the excellent Yew staff that Crowley made for the U6 mod. So far, it functions properly as I want it to, along the lines of the original U6 -

-it checks for the enchant spell, necessary reagents, and mana
-it 'charges' regular yew staff with the lightning spell (more will be avaliable but just testing this first) 10 charges
- it changes from 'yew staff' to 'yew staff - charged (lightning)' and it functions like a lightning wand.


That part functions just fine. What i'm having trouble doing is changing the 'yew staff - charged' back to a regular uncharged yew staff. Normally when the quality/charges reaches '0' it just puts the staff back into inventory. I tried making a basic code for it to change back but only does so if you double click it. 'event == readied/unreadied' didn't seem to work for me. How can I make the staff change back to a normal yew staff immediately after the quality/charges hits '0'?

Re: yew staff code

Posted: Thu Feb 16, 2012 10:12 pm
by marzo
For event==readied/unreadied to work, you have to tick the 'usecode events' checkbox in shape information for the shape in question.

Re: yew staff code

Posted: Sat Feb 18, 2012 11:24 am
by agentorangeguy
Ohhhhhhhh...i didn't even think of that. ok I'll try that, thanks!