PDA

View Full Version : Ability to assign scripts to an FFC using a script



C-Dawg
06-25-2007, 04:39 PM
I understand that scripts are compiled long before runtime. But it must be possible to re-assign scripts to a room or FFC at runtime, because carry-over FFCs can move scripts into rooms they weren't before. I'd like the ability to assign an FFC script to an FFC at runtime, too.

Here's why that would be useful. Say you have a custom item script that shoots out an FFC when the player uses it. The FFC needs its own script to operate if it is to do something over a period of time. (Like, say, fly across the screen in a particular pattern and react to walls/enemies/etc). But that means you need to rely on carry-over FFCs and ensure that every FFC that might be used by a custom weapon is on every screen of the quest. Tedious.

It would be better if the item script could grab FFC 32 or some other reserved FFC, assign it a script when the item is used, and then send it on it's way. That way, there is NO set-up needed AT ALL except compiling the item and FFC script, and assigning the item script. VERY easy for people who are not familar with scripting, and far less tedious than the alternative method.

Dan Furst
06-26-2007, 10:17 AM
But that means you need to rely on carry-over FFCs and ensure that every FFC that might be used by a custom weapon is on every screen of the quest. Tedious.

No, you would just have to set up every FFC that might be used by a custom weapon on the screen that you get that custom weapon, and denote them as carry-over. (When the ffc is not "in use", just change this->Data to a fully transparent combo.) The trick is to make sure the slots used by all of these FFCs are not used anywhere else.

I think it would be nice if FFCs that carry over were re-assigned to "virtual" slots starting at 33. That way you don't have to worry about a FFC on another screen overriding a carried-over FFC.

C-Dawg
06-26-2007, 12:38 PM
Thats part of the problem, though. If you have multiple custom weapons, you need to use up many of your fairly limited FFC slots (only 32!) on weapons, and you have few left for custom bosses or other cool effects.

And the carryover flag doesn't work perfectly. You can be walking along carrying over like a champ, and then suddenly it won't carryover anymore. I think it has to do with Next-> screen flags... still trying to figure it out. Plus, you need to reset the FFCs on every Continue Here screen, because they will be gone if you die or reset.

Assigning FFC scripts with an item script at runtime would let you re-use only a few FFCs for all of your different weapons, and prevent these carryover issues.

Dan Furst
06-26-2007, 01:20 PM
I see what you mean about Continue Here screens. As far as carry-overs not working properly, I haven't seen (or tested) that, but, it's most likely a bug.

I think I heard (before the GIMME BETA NOW discussion) that better item scripting capabilities (fully scriptable items) were in the works.

Or maybe we can get the FFC slots bumped up to 64. Regardless, I understand the problem you are mulling.