The Ultimate DooMer wrote:I think it's time to change a forumism...
WFDS (Wait for DoomScript)
to
WNDS (Who needs DoomScript)!!!
when the next version comes out.
Graf Zahl wrote:example of new weapon
So my railgun would look like this then:
Code: Select all
WEAPON Railgun 4997
{
DoomEdNum 20040
SpawnNum 170
PickupSound "misc/w_pkup"
PickupMsg "Railgun!"
FireSound "weapons/railgf"
AmmoType Cell
PerShot 10
GiveAmmo 40
States
{
Spawn:
RAIL A -1 BRIGHT
Loop
Ready:
RAIL A 1 A_WeaponReady
Loop
Deselect:
RAIL A 1 A_Lower
Loop
Select:
RAIL A 1 A_Raise
Loop
Fire:
RAIL A 10 A_FireRailgunRight
RAIL B 40
Goto Ready
}
}
One question though: what does the 4997 mean after the actor name? I've seen it in monster definitions too, so it must mean something.
Almost. I didn't export A_FireRailGunRight. The reason for this is the internal handling of the flash animation. For robustness I only exported functions that do not start a flash animation, except A_GunFlash which is explicitly there to do exactly that.
The omitted functions are all of a kind that can be easily emulated by the generic ones.
To use the railgun there's a new function called A_RailAttack which is much more versatile than the old ones.
One bug: Never use the same sprite for the spawn state and for the rest.
The spawn state defines the sprite of the pickup item, not the weapon itself.
The 4997 behind the actor's name is the editor number - i.e the thing you place in a map. For consistency this should have been put inside the braces but that's something I simply forgot when I prepared the code and now it's too late.
