Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Sign in to follow this  
Foxhead

Projectile of the weapon acting weird

Question

I Made a Sword that has a Alt-Fire that fires (Obviously) a Projectile, When I go on Doom to test it, some bizarre things happen  

 

1. When I tap Alt-fire it doesn't fire at all, sometimes fires but only super-close to enemy (face-to-face)

2. Fires bizarrely on the wrong direction, sometimes bellow me, sometimes to a dead enemy (sometimes it only focus on the dead enemy that i just killed with it)

3. How do i make the enemy drop some kind of "Ammo" to supply the weapon? like a tiny energy orb that powers (ammo) the Projectile weapon

 

Heres the Code.

ACTOR SwordBAS : Weapon Replaces Bfg9000
{
  Game Doom
  Weapon.Selectionorder 900
  Weapon.Slotnumber 7
  Weapon.Kickback 150
  Inventory.pickupmessage "You Got THE Sword"
  Obituary "%o was cut in Half by %k's Sword."
  +Weapon.MeleeWeapon
  States
  {
  
  Ready:
  IHSI A 1 A_WeaponReady
  loop
  Select:
  IHSI A 1 A_Raise
  loop
  Deselect:
  IHSI A 1 A_Lower
  loop
  
  Fire:
  IHSM A 3
  IHSM B 3
  IHSM C 3
  IHSM D 2 
  IHSM E 2
  IHSM F 1
  IHSM G 1 A_Custompunch (5,0,0,"Knifepuff")
  IHSM H 1
  IHSM I 1
  IHSM J 2
  IHSM J 0 A_Refire
  Goto Ready
  
  Altfire:
  IHSM A 2
  IHSM B 2
  IHSM C 2
  IHSM D 1 
  IHSM E 1
  IHSM F 1
  IHSM G 1 A_CustomMissile ("Cakeslice",0,1,0,1)
  IHSM H 1
  IHSM I 1
  IHSM J 2
  Goto Ready
  
  Spawn:
  IHSP A -1
  stop
  }
}

ACTOR SwordPuff
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOEXTREMEDEATH
  +PUFFONACTORS
  RenderStyle Translucent
  Alpha 0.6
  SeeSound "SwordHitThing"
  AttackSound "SwordHitWall"
  ActiveSound "SwordMiss"
  VSpeed 1
  States
  {
  Spawn:
    PUFF ABCD 4
    Stop
  }
}  

ACTOR cakeslice
{
  Radius 8
  Height 6
  Speed 30
  Damage 20
  Projectile
    +NOGRAVITY
	+NOTELEPORT
	+RANDOMIZE
  SeeSound "weapons/rocklf"
  DeathSound "weapons/rocklx"
  Obituary "$OB_MPROCKET" // "%o rode %k's rocket.
  States
  {
  Spawn:
    IHSC A 1 Bright
    Loop
  Death:
    MISL B 8 Bright A_Explode
    MISL C 6 Bright
    MISL D 4 Bright
    Stop
  }
}

 

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0
34 minutes ago, Thfpjct said:

Thanks man, do you know how i can make the ammo part that i ask?

First, you need to make a custom ammo type.  Then, make your weapon use that ammo type for its alt-fire with Weapon.AmmoType2, Weapon.AmmoUse2, and Weapon.AmmoGive2.  Then, make a replacement for each monster you want to drop that ammo, something like this:
 

ACTOR ThfpjctZombieman : Zombieman replaces Zombieman
{
  DropItem "ThfpjctAmmo"
}

This example will make pistol zombies drop ThfpjctAmmo instead of dropping a clip.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×