A Christmas present for ZDoom

Moderator: GZDoom Developers

User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC
Contact:

Post by Your Name Is »

LFIjdsafdnldsjflsndf
Bleh yeah!

I will wait patiently for .97 to come out, so Wiki can help meh.
User avatar
Killo Zapit
Posts: 292
Joined: Wed Jul 16, 2003 9:26 pm
Location: Most likely sleeping.

Post by Killo Zapit »

I still have need of something like this for destroyable items:

Code: Select all

void A_UnSetSpecial (AActor *self)
{
	self->flags &= ~MF_SPECIAL;
}
Out of curiosity, if I wanted to make my own exe, how would I add it to the codepointer list? Do I just stick "FUNC(A_UnSetSpecial, NULL)" somewhere in the "AFuncDesc AFTable[]=" block?

Also, would it someday be possible to set an item's use function to run a codepointer and/or action special like a state? I think it can be done. Maybe I should try and do it myself. I am not exactly a coder though. Let's see if I got the steps right: 1. Put "{ "inventory.useaction", (apf)InventoryUseAction, RUNTIME_CLASS(AInventory) }," somwhere in the "ActorProps props[] =" block. 2. Create a static "static void InventoryUseAction (Inventory *defaults, Baggage &bag)" function which does the following: SC_MustGetString(), Split the sting into the codepointer/action special name and any parameters, look up the codepointer/action special, store the codepointer/action special somewhere, and set's the item's "Use" function to some other function. 3. Make the inventory use function which will recall all the data stored in InventoryUseAction, and run the codepointer/action special as if the player had. I am not entirely sure how to do all of that. Is there an easier way?

Then again, I would have to convert all the project files ZDoom uses anyway because my copy of Visual C++ is out of date if I wanted to compile anything anyway...
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Killo Zapit wrote: Out of curiosity, if I wanted to make my own exe, how would I add it to the codepointer list? Do I just stick "FUNC(A_UnSetSpecial, NULL)" somewhere in the "AFuncDesc AFTable[]=" block?
If it hasn't changed since around the time when thingdef was new, then yes that is all you need to do basically.

Also, check the wiki for info on how to convert the project files and upgrade VS .net ;) (I cant be bothered to check the link, but it is on the recent changes list)
User avatar
Chilvence
Posts: 1647
Joined: Mon Aug 11, 2003 6:36 pm
Contact:

Post by Chilvence »

Your Name Is wrote:LFIjdsafdnldsjflsndf
Bleh yeah!

I will wait patiently for .97 to come out, so Wiki can help meh.
http://forum.zdoom.org/viewtopic.php?p= ... test#83691
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 »

Another thing I've noticed is that Weapon.AmmoGive does not appear to work (correctly). I haven't extensively tested where the problem originates, but every single DECORATE weapon only gives 2 ammo when picked up. Now, I have the weapons ordered as so:

Code: Select all

ACTOR IceGrenadeLauncher : Weapon 20018
{ 
	Weapon.AmmoGive 2 
} 

ACTOR IceLauncherPowered : IceGrenadeLauncher
{ 
	+POWERED_UP 
	Weapon.AmmoGive 0 
} 

ACTOR Railgun : Weapon 20020
{ 
	Weapon.AmmoGive 10
} 


ACTOR AutoRailgun : Railgun
{ 
	+POWERED_UP 
	Weapon.AmmoGive 0 
} 

ACTOR SekreetWeapon : Weapon 20019
{ 
	Weapon.AmmoGive 10 
} 

ACTOR SuperSekreetWeapon : SekreetWeapon
{ 
	+POWERED_UP 
	Weapon.AmmoGive 0 
} 

ACTOR BombLauncher : Weapon 20000
{ 
	Weapon.AmmoGive 2
} 

ACTOR SuparMiniMissileLauncher : Weapon 20001
{ 
	Weapon.AmmoGive 2
} 

ACTOR SuperSuparMiniMissileLauncher : SuparMiniMissileLauncher
{ 
	+POWERED_UP 
	Weapon.AmmoGive 0 
} 

ACTOR SekreetWeapon2 : Weapon 20021
{ 
	Weapon.AmmoGive 2 
}
I'll try experimenting with the first and last weapons and see which one affects all of the other weapons.

EDIT: It's the last weapon that affects all the others.
User avatar
Your Name Is
Posts: 802
Joined: Sun Oct 31, 2004 5:06 pm
Location: Raleigh, NC
Contact:

Post by Your Name Is »

Chilvence wrote:
Your Name Is wrote:LFIjdsafdnldsjflsndf
Bleh yeah!

I will wait patiently for .97 to come out, so Wiki can help meh.
http://forum.zdoom.org/viewtopic.php?p= ... test#83691
Zdoom won't run 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 »

Of course not! This code hasn't been officially incorporated yet! Use the EXE that can be found somewhere in this thread.
User avatar
Finalizer
Posts: 180
Joined: Fri Sep 24, 2004 6:07 am

Post by Finalizer »

Well, that, and I believe there was a problem with the ammo since it wasn't defined (I think that was the problem... I never actually ran that test file, and have yet to start making ammo-using weapons for my own project). Simply change the ammo type in Graf's example to something already defined ("Clip"), and I don't think there's any reason why it wouldn't work.
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. »

Is it just me or does the weapon AttackSound not work?
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 »

Finalizer wrote:Well, that, and I believe there was a problem with the ammo since it wasn't defined (I think that was the problem... I never actually ran that test file, and have yet to start making ammo-using weapons for my own project). Simply change the ammo type in Graf's example to something already defined ("Clip"), and I don't think there's any reason why it wouldn't work.
They are already defined as existing ammo types, I just only put in all the extremely relevant information.
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 »

New undocumented (because Graf is EVEEL) weapon stuff for you people who are using this version:

A_FireBullets(h-spread,v-spread,pellets,damage,(unused?),ammo)
A_RailAttack(damage,x-offset,ammo)
Anakin S. wrote:Is it just me or does the weapon AttackSound not work?
AttackSound works with A_FireBullets.
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. »

Would it be possible to add an angle parameter to A_SpawnItem? With that we could emulate the firestorm circle of flames and the pain elemental's death.
deathz0r wrote:
Anakin S. wrote:Is it just me or does the weapon AttackSound not work?
AttackSound works with A_FireBullets.
Oh. So that's why it didn't work for me. I was only spawning missiles. Thanks. :oops:
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 »

Anakin S. wrote:Would it be possible to add an angle parameter to A_SpawnItem? With that we could emulate the firestorm circle of flames and the pain elemental's death.
deathz0r wrote:
Anakin S. wrote:Is it just me or does the weapon AttackSound not work?
AttackSound works with A_FireBullets.
Oh. So that's why it didn't work for me. I was only spawning missiles. Thanks. :oops:
Sure. But it still won't thrust the object so you wouldn't be able to emulate the Pain Elemental with it unless you make the change in the spawned monster.
User avatar
AFADoomer
Posts: 1346
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Post by AFADoomer »

A Question: How difficult would it be to add another variable for scaling the on-screen view of the weapon? It seems odd that this is available for all other sprites in DECORATE, but not the weapons...

And yes, I know, I know "code it yourself, blah, blah..." If I could get .96 to compile, I would try... the last version I could compile was .63a.
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 »

You have to ask Randy about that. I never really bothered understanding the rendering code.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”