PDA

View Full Version : Spawning weapons / items in use



C-Dawg
05-15-2007, 11:18 AM
I don't see anything in the documentation for ZScript that lets us spawn items in use yet. That is, creating a bomb with the fuse already lit, or creating an arrow at some location.

I'm interested in this functionality to script missiles (ffc shoots out from player, when it hits a solid combo or enemy it spawns a bomb with 0 fuse) and spread weapons (three arrows shoot out in front of player).

Revfan9
05-15-2007, 04:53 PM
The functions don't exist in Zscript yet because the Zasm functions just crash the game. Once that is fixed, we'll probably see some way to do it in Zscript.

DarkDragon
05-21-2007, 05:22 PM
I plan on doing a large overhaul of the ZScript language in the future, after the bugginess of ZC dies down a bit. Included in this update would be better inter-script communication, arrays, and weapon scripting.

Weapon scripting requires a good amount of overhead to implement because the current setup, with enemy and player weapons using an identical set of differently named variables, is poor.

C-Dawg
05-21-2007, 05:24 PM
Just don't screw up ZScript so much that the previous scripts won't work anymore. If you can help it.

DarkDragon
05-21-2007, 05:27 PM
Scripts that are already compiled into ZASM and integrated into quests ideally will work forever.

I will strive to make sure old scripts continue to compile in new versions of the compiler, but some syntax will probably have to be deprecated (the current system of using -> to refer to global variables comes to mind.)

In any case you'll have plenty of warning about any changes that might break old scripts.

C-Dawg
05-21-2007, 05:45 PM
There's a problem with the way the compiler works now that might interfere with this plan. If I have scripts loaded into FFC slots 1 - 26, for instance, and I compile a new, updated ZScript, it will clear out all of the old scripts. Seems like I can only have one thing in the buffer at once. Am I missing something about how ZScript scripts work?