A_WeaponOffset(float x = 0, float y = 32, flags = 0)
- WOF_KEEPX - Don't change the X offset.
- WOF_KEEPY - Self explanatory.
- WOF_ADD - Add instead of replace the offset.
Code: Select all
Actor Tok : Inventory
{
Inventory.MaxAmount 360
}
Actor RL2 : RocketLauncher
{
+WEAPON.AMMO_OPTIONAL
+WEAPON.ALT_AMMO_OPTIONAL
Weapon.AmmoUse1 0
Weapon.AmmoUse2 0
States
{
Ready:
MISG A 1
{
A_WeaponReady;
A_GiveInventory("Tok",10);
if (CountInv("Tok") >= 360)
{ A_TakeInventory("Tok",1000,0); }
A_WeaponOffset(sin(CountInv("Tok")) * 10);
}
Loop
Fire:
MISG B 4 A_GunFlash
MISG B 6 A_FireCustomMissile("Rocket",0,0)
MISG B 1 A_Refire
Goto Ready
}
}