New features (last update 8.8.2005)

Moderator: GZDoom Developers

Locked
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

DoomRater wrote:
Graf Zahl wrote:Fail is in. But what do you mean?
I'm pretty sure that the pickup code is being called before the check to see if the inventory item/weapon can actually be picked up is called. The pickup code runs even when we can't actually pick the weapon up.

That's the point of it. It will always be executed. If it succeeds the item will be picked up. If not the real pickup behavior will decide. How else are you supposed to use it to script your own items? This is not meant to be a replacement for using the pickup special that gets executed when an item is picked up. It is meant to script your own pickup items.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Anakin S. wrote:
Graf Zahl wrote:
Suggested flags:

+NOAUTOAIM for weapons, so we can make a weapon that doesn't target at an enemy (Like the railgun)
Rather an option to the firing code pointer than as a flag.
How about a flag for an actor as well so that weapons would not auto aim at that actor if the weapon is fired at it (like the green pods in Heretic)?
I'd rather see a general option that makes aiming smarter. It really shouldn't aim at the first shootable object in sight. The way it is now I find autoaim more a problem than help so I normall play with it being switched off.

Bio Hazard wrote:
Graf Zahl wrote: Too much work for an unofficial build. Sorry.
Um, isin't that what A_Jiggle() does? And you said that was possible...
How about also including the possibility for weapon sprite offsets, such as those used for hexen weapons? For example, the cleric's mace smoothly falls off the screen and is brought up again. For these weapons, there are certain values set in each frame that indicate the offset for that particular frame.
[/quote]

Already in. Use OFFSET(x,y) in the state definition.
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm
Contact:

Post by Daniel »

Cool!

Another codepoint I thought:

A_MeleeChase -> the monster will chase the enemy without the probability of use the "Missile" state (without far attacking). This can be cool if you want some new reaction from the monster.

Btw, the Fail command still "fails"... if you have a weapon with it and full ammo, if you stay on the weapon sprite and fire, it will fire and receive infinite ammo without the weapon to dissappear...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Daniel wrote:Cool!

Another codepoint I thought:

A_MeleeChase -> the monster will chase the enemy without the probability of use the "Missile" state (without far attacking). This can be cool if you want some new reaction from the monster.
Good thing that I did some changes to A_Chase which makes implementing this a matter of minutes.
Btw, the Fail command still "fails"... if you have a weapon with it and full ammo, if you stay on the weapon sprite and fire, it will fire and receive infinite ammo without the weapon to dissappear...
Not surprising considering that I haven't released it yet!
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm
Contact:

Post by Daniel »

Graf Zahl wrote:Good thing that I did some changes to A_Chase which makes implementing this a matter of minutes.
Thanks Graf!

But the "Fail" command was added by Grubber, into his .exe mod. I think you should talk to him and see what's wrong.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Can you post the item that doesn't work? Then I can look for myself. In my tests it did what I expected it to do.
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm
Contact:

Post by Daniel »

Sorry, if I must extract the weapon from the wad, it will take some time. It's the SubMachineGun and the DoubleSubMachineGun made by Chaoscentral, that uses something like this:

Pickup:
UZI1 A 0 A_JumpIfInventory("Uzi",1,1)
Fail
UZI1 A 0 A_GiveInventory("DoubleUzi",1)
Fail

When you reach full ammo and shot it a few, if the remain ammo is smaller than the total ammo gived by the weapon(for example you have 296 bullets and the weapon gives you 16), the weapon gives you the ammo but doesn't disappear.


Another bug I've noticed: when you spawn a Friendly monster like the ghosts in Weapon 666, and there is no enemy at sight, if they listen to your shot, they'll become agressive to you, losing the Friendly flag. I need this bug to be fixed urgently, because I have a lot of stuff that needs the Friendly flag, such as the AutoDetectionMine, Ajudant (wish it works like the DarkServant) and the Weapon 666.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

That's because 'fail' tells the game that you don't want the weapon to be picked up. Since it doesn't get picked up by its own code as well it remains. After the GiveInventory you have to put a 'stop', not a 'fail'!
User avatar
Daniel
Posts: 811
Joined: Sun Jul 04, 2004 3:21 pm
Contact:

Post by Daniel »

But Stop makes that evil "weapon stay" bug: the weapon remais on the floor, being infinitely pickable, when you have full ammo for this weapon. Remembering, this bug appears when you use the PICKUP state.

And about the FRIENDLY bug? Could you take a look for me?

I had an idea: A_JumpIfAmmoLower(x,y) -> jumps y distance if the weapon ammo number is lower than x ammo - this will help to improve some weapon features.

Btw, seems that there isn't possible to a weapon get negative ammo values anymore. I appreciate that!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Daniel wrote:But Stop makes that evil "weapon stay" bug: the weapon remais on the floor, being infinitely pickable, when you have full ammo for this weapon. Remembering, this bug appears when you use the PICKUP state.
That's standard weapon behavior. I can't change that. 'Fail' does not force pickup. It prevents it.
And about the FRIENDLY bug? Could you take a look for me?
It doesn't happen to me and in the last few days I tested a lot with friendly monsters. So either it is a phantom bug or it got fixed already.
User avatar
DomRem
Posts: 976
Joined: Thu May 12, 2005 5:04 pm
Location: SporkServ #11 (Coop) >> Scythe 2 <<
Contact:

Post by DomRem »

Daniel wrote:...when you spawn a Friendly monster like the ghosts in Weapon 666, and there is no enemy at sight, if they listen to your shot, they'll become agressive to you, losing the Friendly flag.
That is definitely not true. I've had hundreds of friendly monsters roaming around the same room with a group of Cajun bots(they like to fire at friendly monsters), and the only time where the monsters turned on the bots was an instance when one bot shot another.

Graf, what Daniel is referring to is a strange bug with one of his weapons in ZDGuns - the 666 Gun. It fires off six friendly ghosts(three red ones which attack, and three transparent ones which resurrect the enemies). However, something goes wrong after a while. When all nearby monsters are dead, and possibly if you fire a shot like Daniel said(though I'm not sure of that part), the red ghosts will turn on the player and start to attack him/her.

EDIT: I found a thread about this. HobbsTiger1 thinks it's the DECORATE, but I figure that you can confirm this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49223
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

I have to see the full DECORATE script to say anything about this.
User avatar
DomRem
Posts: 976
Joined: Thu May 12, 2005 5:04 pm
Location: SporkServ #11 (Coop) >> Scythe 2 <<
Contact:

Post by DomRem »

Alright, here it is. It's quite long, so I put it in a spoiler:
Spoiler: Weapon 666 DECORATE
Last edited by DomRem on Tue Jun 21, 2005 4:43 pm, edited 1 time in total.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

Daniel wrote:But Stop makes that evil "weapon stay" bug: the weapon remais on the floor, being infinitely pickable, when you have full ammo for this weapon. Remembering, this bug appears when you use the PICKUP state.
Uh, Daniel, use this code first, then tell us whether that nasty bug is still around.

Code: Select all

Pickup:
UZI1 A 0 A_JumpIfInventory("Uzi",1,1)
Fail
UZ1 A 0 A_JumpIfInventory("Clip",400,1)
Fail
UZI1 A 0 A_GiveInventory("DoubleUzi",1)
Stop
I think I understand what JumpIfInventory does. Basically what I'm trying to do is check the ammo myself.

EDIT: since this won't work if the ammolimit is something other than 400, I'd like a A_JumpIfMaxAmmo(AmmoType,FramesToJump) or something.
Last edited by DoomRater on Tue Jun 21, 2005 4:43 pm, edited 1 time in total.
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. »

Graf Zahl wrote:Already in. Use OFFSET(x,y) in the state definition.
Great. How do you use it? Do you have an example?
Locked

Return to “Closed Feature Suggestions [GZDoom]”