Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I have a question about how exactly "ask entry" works. I have an item, a magic staff, that can emulate any other type of staff in the game. I have the conversion event bound to a keydown event and an ask entry action that asks what type of staff you want to convert to. I want the event to work so that if you say 'fire,' the staff will become a fire staff, or 'ice' for an ice staff, etc.
Thanks
------------------ Surely you can't be serious! But I am serious, and don't call me Shirley!
Quote
Originally posted by BryceCubed: I have a question about how exactly "ask entry" works. I have an item, a magic staff, that can emulate any other type of staff in the game. I have the conversion event bound to a keydown event and an ask entry action that asks what type of staff you want to convert to. I want the event to work so that if you say 'fire,' the staff will become a fire staff, or 'ice' for an ice staff, etc.
Do you want the staff to change back afterwards, or be a 1-time changer? The former is fairly simple; the latter a bit more complicated. As my time is limited right this second I'll go over the former and, if no one has posted the method for the latter then I'll go over that as well.
You will need the following:
Basically you are going to have the following structure:
Voila you are done.
------------------ (url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://stark.evula.net/plugins/dev_tools.htm")PoG Dev Tools(/url) | (url="http://"http://stark.evula.net/plugins/spells_expander.htm")Spells Expander(/url) (url="http://"http://stark.evula.net")Stark.evula.net(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://mail.ambrosiasw.com/mailman/listinfo/coldstone_dev")Coldstone-dev mailing list(/url) | (url="http://"http://ucplugs.evula.net/pog.html")PoG Upcoming Plug-Ins Directory(/url)
Ok.. for a staff that can change back and forth there are several options that you can do, based on how you want it to work.
The base code will be the same, as I showed earlier. The difference will be on the new item.
One option would be to have the new item be available for a duration and then 'revert' back to the original staff-changing item. You could do this by casting a dummy spell when the staff is changed and, when the spells duration expires, replace the new staff with the original. Or you could make a timer that does the same thing.
Another option would be that the staff, even in its new form, is still a changer. In other words the player could still ask the new staff to change into another item. For this you would just copy the original staff-changing code into each of your items so that it could continually change. Make sure you put a check on it so that it can't change into the staff it already is!
A third option would be similar to the first, except that instead of a time delay you could have a usage limit. Ie, say the staff of ice can only be used 10 times and then it reverts back to the original staff. To do this you would just go into the spell that the staff casts(since it is assumed that the staffs will cast spells for their attack) and have a global incremented every time the spell goes off. When it reaches 10(or whatever number you so choose) then it will cast and then replace the staff with the original.
Again, a lot of options depending on how you want things to work.
Thanks Stark, I wanted to make sure it worked before I replied, and it does
Originally posted by BryceCubed: Thanks Stark, I wanted to make sure it worked before I replied, and it does
No problem, that's why I'm here.
Out of curiousity, which method did you end up using?
Originally posted by Stark Bledfast: **No problem, that's why I'm here.:)
**
I used the method where you can change back and forth between staffs. I actually took it it further and made 4 levels of staffs, and whatever the level is of the staff that changes, is the level of the staff it changes into.
For example, the level 1 staffs available are: Wizard's Staff (the one that can change), Fire staff, Ice Staff, Electric staff, and Acid staff. There is a class for each staff, but the Wizard, who is the only one who can use the Wizard's staff, can change staffs at will when he has the Wizard's staff equipped. The level 2 staffs: Master's staff (upgraded version of Wizard's staff and can also change), Staff of Wildfire, Chill staff, Staff of Lightning Blast, and Staff of Burning Liquid. Basically, if the Wizard uses the Master's staff to change, then he would get one of the level 2 staffs instead of one of the level 1 staffs. (naturally, the higher the level, the more powerful the staff)
I think this is going to be really cool.
Originally posted by BryceCubed: I think this is going to be really cool.
Sounds very cool.
I like polymorphing items.