Page 9 of 42

Posted: Fri Jan 07, 2005 2:59 am
by deathz0r
This stuff is hot, but I wonder about the following in Graf's example:

Code: Select all

CHGG A 10 A_CustomPunch(5000, 1, 0, "Blood") 
CHGG A 0 A_FireCustomMissile("IceBall", -20, 0, -10, 10)
Can anyone explain what those numbers do? I've assumed that 5000 is melee damage, but I'd rather be certain.

EDIT: Ok, the fourth number in the second line is obviously missile height, still trying to figure out the rest.

EDIT 2: Trying this code out, I made a weapon that shoots ice grenades. However, the projectiles that spawn from the powered-up grenade aim vertically at the player. Here's the code:

Code: Select all

actor SuperIceGrenade
{
	Radius 12
	Height 8
	Speed 20
	Damage 10
        +NoBlockmap
        +LowGravity
        +ActivatePCross
        +ActivateImpact
        +NoTeleport
        +DropOff
        +Missile
	+DoomBounce
	+IceDamage
	ExplosionDamage 128
	ExplosionRadius 128
	SeeSound "weapons/rocklf"
	DeathSound "weapons/rocklx"
	States
	{
	Spawn:
		MISL A 8
		Loop
	Death:
		MISL B 8 A_Explode
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,0)
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,36)
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,72)
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,108)
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,144)
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,180)
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,216)
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,250)
		MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,288)
		MISL C 8 A_CustomMissile("SuperIceGrenade2",8,0,324)
		MISL D 8 A_Explode
		Stop
	}
}

projectile SuperIceGrenade2
{
	Sprite PLSS
	Frames "AB"
	DeathSprite PLSE
	DeathFrames "ABCDE"
	Radius 12
	Height 8
	Damage 5
	Speed 20
        NoBlockmap
	NoGravity
        ActivatePCross
        ActivateImpact
        NoTeleport
	DamageType Ice
	DeathSound "baron/shotx"
}

Posted: Fri Jan 07, 2005 3:43 am
by Graf Zahl
A_CustomPunch(damage, dontrandomize, useammo, pufftype)
A_FireCustomMissile(type, angle, useammo, xy-offset, spawnheight)


And please don't expect any useful documentation unless this has actually been added to ZDoom. And even then it's up to Randy to change it if he doesn't like parts of it.

Posted: Fri Jan 07, 2005 4:08 am
by deathz0r
Graf Zahl wrote:A_CustomPunch(damage, dontrandomize, useammo, pufftype)
A_FireCustomMissile(type, angle, useammo, xy-offset, spawnheight)
Excellent, now I have something to do for a few days.

Posted: Fri Jan 07, 2005 10:52 am
by TheDarkArchon
Deathz0r: This will sort your grenade problem.

Code: Select all

actor SuperIceGrenade : IceGrenade
{ 
States 
{  
Death: 
MISL B 8 A_Explode 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,0) 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,36) 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,72) 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,108) 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,144) 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,180) 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,216) 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,250) 
MISL C 0 A_CustomMissile("SuperIceGrenade2",8,0,288) 
MISL C 8 A_CustomMissile("SuperIceGrenade2",8,0,324) 
MISL D 8 A_Explode 
Stop 
} 
} 

Posted: Sat Jan 08, 2005 2:27 am
by deathz0r
TheDarkArchon wrote:Deathz0r: This will sort your grenade problem.
That's not the problem I'm having. The projectiles that are spawned from the explosion vertically aim towards players. That's a bug (hopefully not related to Chiv's changes) that should be sorted out. If I had any brains on how to code, I'd compile my own version of 96 using Graf's diff and find out if it still happens.

Posted: Sat Jan 08, 2005 3:30 am
by Graf Zahl
deathz0r wrote:
TheDarkArchon wrote:Deathz0r: This will sort your grenade problem.
That's not the problem I'm having. The projectiles that are spawned from the explosion vertically aim towards players. That's a bug (hopefully not related to Chiv's changes) that should be sorted out. If I had any brains on how to code, I'd compile my own version of 96 using Graf's diff and find out if it still happens.

Thst's not a bug. That's a result of improper use of A_CustomMissile. Each missile stores its originator in the 'target' field. But that's exactly what A_CustomMissile has to aim at to work under normal (i.e. a monster attack) circumstances. Plus, changing it might break some existing DECORATE stuff.

Posted: Sat Jan 08, 2005 9:53 am
by Chilvence
Ah, I see, you want to make a ring of ice projectiles. If you can squeeze an extra parameter into A_CustomMissile, then why not have an "ignore target" switch on the end? Or does decorate have to specify exactly the right amount of parameters?

Posted: Sat Jan 08, 2005 10:24 am
by HotWax
Perhaps this calls for an entirely new special, since it seems alot of people are running into this problem with A_CustomMissile. Perhaps A_MissileNoTarget("missiletype", spawnheight, spawnofs_xy, angle_horz, angle_vert), and maybe even a A_MissileAimRandom("missiletype", spawnheight, spawofs_xy) which would pick random values for the last two parameters?

Posted: Sat Jan 08, 2005 10:33 am
by Chilvence
Actually, I remember I wanted an A_TossRandom before for something, but it was forgotten about. They're both simple, but will they be added if I do them?

Really, it seems like every day we want more of the Zdoom pie :D . Maybe that cvs place would be handy right now...

Posted: Sat Jan 08, 2005 12:08 pm
by Graf Zahl
Chilvence wrote:Actually, I remember I wanted an A_TossRandom before for something, but it was forgotten about. They're both simple, but will they be added if I do them?

Really, it seems like every day we want more of the Zdoom pie :D . Maybe that cvs place would be handy right now...

Just write them and create a .diff to the files in the first post.

Posted: Sat Jan 08, 2005 1:08 pm
by Anakin S.
HotWax wrote:Perhaps this calls for an entirely new special, since it seems alot of people are running into this problem with A_CustomMissile. Perhaps A_MissileNoTarget("missiletype", spawnheight, spawnofs_xy, angle_horz, angle_vert), and maybe even a A_MissileAimRandom("missiletype", spawnheight, spawofs_xy) which would pick random values for the last two parameters?
Yes, that would be good. Perhaps with A_MissileAimRandom there could be some other parameters to define the range of randomness like (hlow, hhigh, vlow, vhigh).
Chilvence wrote:Ah, I see, you want to make a ring of ice projectiles. If you can squeeze an extra parameter into A_CustomMissile, then why not have an "ignore target" switch on the end? Or does decorate have to specify exactly the right amount of parameters?
We already have the aim parallel parameter to control whether missiles would aim at a target or go along their own horizontal paths, so why not have a vertical control as well?

Posted: Sat Jan 08, 2005 4:01 pm
by Chilvence
Anakin S. wrote: We already have the aim parallel parameter to control whether missiles would aim at a target or go along their own horizontal paths, so why not have a vertical control as well?
We do? Well then, at least deathz0r should be able to fix his ice grenade thing for now. How do you use it?

Posted: Sat Jan 08, 2005 4:42 pm
by Graf Zahl
It won't help. All it does is to aim all missiles parallel to one starting at a height of 32. The aim at the target remains the same, jusr with a z-offset.

Posted: Sat Jan 08, 2005 5:58 pm
by randi
I'm stickying this for the time being so that it doesn't get lost.

Posted: Sat Jan 08, 2005 6:33 pm
by deathz0r
Hmm, this is weird:

http://deathz0r.unidoom.org/junk/doom0001.png
http://deathz0r.unidoom.org/junk/doom0002.png

It also happens with the other new weapons I've made, but here's the DECORATE stuff for this particular weapon. What could be causing it? And before anyone even bothers saying the obvious, it is graphically offset correctly.

Code: Select all

ACTOR Railgun : Weapon 20020
{ 
   +AMMO_OPTIONAL 
   Weapon.SelectionOrder 700 
   Inventory.PickupSound "misc/w_pkup" 
   Inventory.PickupMessage "You got the railgun!" 
   Weapon.AmmoType "Cell" 
   Weapon.AmmoGive 10 
   Weapon.AmmoUse 1 
   AttackSound "weapons/railgf" 
   Weapon.SisterWeapon AutoRailgun
   States 
   { 
   Spawn: 
      RALG A -1 
      Loop 
   Ready: 
      RLGG A 1 A_WeaponReady 
      Loop 
   Deselect: 
      RLGG A 1 A_Lower 
      Loop 
   Select: 
      RLGG A 1 A_Raise 
      Loop 
   Fire: 
      RLGG A 8
      RLGG A 0 
      RLGG A 4 A_RailAttack(100, 0, 1)
      RLGG B 36
      RLGG B 0 A_ReFire 
      goto Ready 
   } 
}