PDA

View Full Version : Two Simultaneous Swords: How?



ShadowTiger
07-01-2007, 09:32 AM
If there is only one sword class of items, how is it possible to have two unique swords in your inventory, choosable between at will? If you can set the item class in the Item Editor as a z###-type, how would it know that it's a sword?

Questions
07-01-2007, 10:39 AM
Rescript the sword I'd guess.

That gives me an Idea. The Dev's should release the Code to the default Item Classes as ZScripts. This'll help us clone items and it could be a nice resource when learning to script.

Dan Furst
07-02-2007, 10:04 AM
The only problem with that is, item scripts (currently) execute for only one frame. You'd have to do the "attached ffc script" voodoo.

C-Dawg
07-02-2007, 12:00 PM
Eminently doable now that I've sauced what it is that stops FFCs from carrying over. But complicated and requires set up.

Although- can't you include a while loop in an item script? Can you extend the item's effect that way? What effect does that have on the item's use?

pkmnfrk
07-02-2007, 12:13 PM
Although- can't you include a while loop in an item script? Can you extend the item's effect that way? What effect does that have on the item's use?

According to the official documentation, item scripts end after 1 frame. In other words, Waitframe() is the same as calling Quit().

I don't see why this should be, but that's how it is (although, admittedly, I haven't tested it)

C-Dawg
07-02-2007, 12:33 PM
Yea, that makes sense. Well, you can pair it with an FFC or with a global script to ensure it's effect lingers.

Dan Furst
07-02-2007, 01:48 PM
Global scripts execute for one frame also, I believe. (Feel free to correct me, I've never tried it.)

I think I heard talk of fully scriptable items being developed before the current feature freeze.

C-Dawg
07-02-2007, 03:17 PM
Then it is as it should be. The scripters are the future of feature bloat - let's let the devs get a stable engine for everyone else.