Page 1 of 1

G36K: A Final Trio Of Questions

Posted: Sun Jun 24, 2007 11:11 am
by masterofpsi
In February, I worked on a G36K in Decorate. Due to hardware failure, school, and a couple of other issues, the project was tabled.

Now, after about 2 hours work (which I should have done months ago), it's just about finished. However, there's a few issues/bugs that I would like some help with. If anyone knows the answers to these few questions, please help. Also, if you have any suggestions, let me know. I can't please everyone, but I don't have to piss everyone off either. :P

1. Currently, when the gun is out of ammo, it does the stereotypical "click click click". I couldn't get A_CheckReload to work, but if you know, please tell me.
2. Casings don't really bounce. At all. They had the DoomBounce flag, but that didn't do any. Is there a state I need to add, or other flags/properties I need to play with?
3. I couldn't get the normal gun's spawn state to spawn the "giver" powerup. Is that because a weapon can't use A_SpawnItem in its spawn state?

I'd like to thank everyone who's helped so far, and anyone who helps now. I'll get a list of credits together, and don't worry, it won't take me as long to finishas the gun did. :wink:

Posted: Sun Jun 24, 2007 12:00 pm
by The NUtcracker
1. Works for me, and A_CheckReload doesn't check ammo for reloading, it skips the rest of the current state if the player is out of ammo.

2. Add A_Gravity to all the states and add a loop state.

3. Why would you want the gun's spawn state to spawn the g36kgiver?

Posted: Sun Jun 24, 2007 12:26 pm
by Matt
@NUtcracker: If you're in co-op and you drop an empty weapon, it could lie there forever because everyone already has a G36K by the time they reach it. Also, if you have a G36K with partial ammo and pick up another without going through this extra step, your mag is replenished instead of rounds being added to your inventory.

@MOP: You need to have the G36KGiver "replace" the G36K. Thiw would work in all situations except where you drop the weapon through A_DropInventory or the console (neither of which you need to use, I suspect).

A_CheckReload only works if you don't have +ammo_optional. I'm still working on how to get around this without forcing the player to use a separate reload key, but if you don't mind forcing the player to do so just make sure for all reloading weapon that the alt ammo is the amount in your inventory and the primary ammo is the mag in your gun.

Posted: Sun Jun 24, 2007 12:35 pm
by Matt
The casing should be a projectile with -nogravity and +bounceonactors. I'd recommend you loop the spinning animation and use the death state to indicate when the casing has come to a stop.