Jump to content
  • 0

Trying to make a new plasma rifle, but i am unsure how to make the projectile come from the barrel of the gun.


CanadianJames

Question

Posted (edited)

I am using a modified flamethrower sprite from TekWar for my gun.

 

I'm also using decorate, and for some reason i'm just unsure how to go about doing this. I've tried using the example from this page on the zdoom wiki, but when i attempt to launch the wad i get an error message that says "Script error, "MoonNaz.wad:DECORATE" line 1353: Expected ',', got ':'."

 

this is my script here

 

ACTOR PlasmaGewehr : Weapon 15041
{
  Weapon.SelectionOrder 100
  Weapon.SlotNumber 5
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Inventory.PickupMessage "$GOTPLASMA"
  Tag "$TAG_PLASMARIFLE"
  States
  {
  Ready:
    PLGW A 1 A_WeaponReady
    Loop
  Deselect:
    PLGW A 1 A_Lower
    Loop
  Select:
    PLGW A 1 A_Raise
    Loop
  Fire:
    PLGW BC 3 A_FireProjectile("PlasmaRed", spawnofs_xy:8, spawnheight:8);
    PLGW E 20 A_ReFire
    Goto Ready
  Spawn:
    PLGW D -1
    Stop
  }
}

ACTOR PlasmaRed 15042
{
  Radius 13
  Height 8
  Speed 25
  Damage 5
  Projectile
  +RANDOMIZE
  +ZDOOMTRANS
  RenderStyle Add
  Alpha 0.75
  SeeSound "weapons/plasmaf"
  DeathSound "weapons/plasmax"
  Obituary "$OB_MPPLASMARIFLE" // "%o was melted by %k's plasma gun."
  States
  {
  Spawn:
    PLSS AB 6 Bright
    Loop
  Death:
    PLSE ABCDE 4 Bright
    Stop
  }
}

 

if you can help this would be appricated.

 

 

Edited by CanadianJames

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 1

Looks like the example is using ZScript (note the ; at the end of the lines).

 

I'm not sure DECORATE can put parameter names down like that so just try doing 

A_FireProjectile("PlasmaRed", 0, true, 8, 8)

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...