A Christmas present for ZDoom

Moderator: GZDoom Developers

User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post 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"
}
Last edited by deathz0r on Tue Jan 11, 2005 4:33 pm, edited 2 times in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post 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.
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post 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.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post 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 
} 
} 
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post 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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post 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.
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post 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?
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post 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?
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post 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...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post 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.
User avatar
Anakin S.
Posts: 1067
Joined: Fri Nov 28, 2003 9:39 pm
Location: A long time ago in a galaxy far, far away...

Post 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?
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post 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?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post 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.
User avatar
randi
Site Admin
Posts: 7750
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Post by randi »

I'm stickying this for the time being so that it doesn't get lost.
User avatar
deathz0r
Posts: 353
Joined: Tue Jul 15, 2003 4:09 pm
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Land with them kangaroo
Contact:

Post 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 
   } 
}
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”