A Christmas present for ZDoom
Moderator: GZDoom Developers
- Anakin S.
- Posts: 1067
- Joined: Fri Nov 28, 2003 9:39 pm
- Location: A long time ago in a galaxy far, far away...
What do each of these properties do? Is one of these the equivalent of Inventory.Amount? Is there a way to make them work so that you can pick up both the old armor bonuses and new armor bonuses up to a maximum of 200? What are the original values the doom armor has?Graf Zahl wrote:Yes, you are. For armor you can't use Inventory.Amount. You have to use Armor.SaveAmount, Armor.MaxSaveAmount and Armor.SavePercent to define its properties.
Daniel:
Inventory.MaxAmount 200
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49056
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Anakin S. wrote:What do each of these properties do? Is one of these the equivalent of Inventory.Amount? Is there a way to make them work so that you can pick up both the old armor bonuses and new armor bonuses up to a maximum of 200? What are the original values the doom armor has?Graf Zahl wrote:Yes, you are. For armor you can't use Inventory.Amount. You have to use Armor.SaveAmount, Armor.MaxSaveAmount and Armor.SavePercent to define its properties.
Daniel:
Inventory.MaxAmount 200
What they do?
Armor.SaveAmount - amount of armor the item gives
Armor.MaxSaveAmount - the maximum amount of armor you can reach with this item
Armor.SavePercent - the effectiveness of the armor. For armor bonuses this has only an effect if you are out of armor when picking them up.
Thanks!
I had some ideas here. I needed that when making some ZDoom mods.
1) Is possible to add an action that changes the RenderStyle and its Alpha? This would be very useful to make projectiles like Rockets (solid in the Spawn state and Translucent in the Death state - the normal rocket is also like that, but the ones I created can't be like that). Something like A_ChangeRender (x,y) where:
x = number of the render (0=none, 1=normal, 2=fuzzy etc..)
y = Alpha number
2) Some special effects for weapon, such as A_WeaponVibrateStart and A_WeaponVibrateEnd, that makes the weapon graphic vibrate. It can be useful for making weapon charging frames.
3) And also that codepointer I mentioned before A_ChangeThingFlags, so you can make a monster that suddenly starts to fly.
I had some ideas here. I needed that when making some ZDoom mods.
1) Is possible to add an action that changes the RenderStyle and its Alpha? This would be very useful to make projectiles like Rockets (solid in the Spawn state and Translucent in the Death state - the normal rocket is also like that, but the ones I created can't be like that). Something like A_ChangeRender (x,y) where:
x = number of the render (0=none, 1=normal, 2=fuzzy etc..)
y = Alpha number
2) Some special effects for weapon, such as A_WeaponVibrateStart and A_WeaponVibrateEnd, that makes the weapon graphic vibrate. It can be useful for making weapon charging frames.
3) And also that codepointer I mentioned before A_ChangeThingFlags, so you can make a monster that suddenly starts to fly.
Hey Graf! I want your help into this:
I made a mine that detects a monster passing by it and explode, but I had several problems due to the coding I've used. These are the problems:
1) When you are facing a wall and drop the mine (I used A_SpawnItem), the mine is spawned out ot the map limits;
2) If I use A_ThrowGrenade, the mine "walks" because the throwing speed in A_ThrowGrenade also affects the "Speed" of the actor spawned;
3) Sometimes the mine seems to explode only for one monster; when another pass into it, it don't explode; I used QUICKTORELATIATE to prevent this, but it didn't work a lot;
4) The worst problem: when you spawn the mine and no monster is in its sight, the mine becomes to hate Player, even with the FRIENDLY flag.
I made a mine that detects a monster passing by it and explode, but I had several problems due to the coding I've used. These are the problems:
1) When you are facing a wall and drop the mine (I used A_SpawnItem), the mine is spawned out ot the map limits;
2) If I use A_ThrowGrenade, the mine "walks" because the throwing speed in A_ThrowGrenade also affects the "Speed" of the actor spawned;
3) Sometimes the mine seems to explode only for one monster; when another pass into it, it don't explode; I used QUICKTORELATIATE to prevent this, but it didn't work a lot;
4) The worst problem: when you spawn the mine and no monster is in its sight, the mine becomes to hate Player, even with the FRIENDLY flag.
Last edited by Daniel on Mon Jun 06, 2005 11:07 pm, edited 1 time in total.
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
A couple of related questions:Graf Zahl wrote:Yes, that would be a simple solution but there is one problem with it. The GiveInventory call will fail when the user has the maximum amount of items of this kind. I think I need to add a mechanism to notify failure. The simplest thing would be a 'Fail' instead of 'Stop' at the end of the state sequence.
EDIT: done
I needed some handling for states which jump to themselves anyway so I just used that to signal failure. And to make it more intuitive I added 'FAIL' as a synonym for 'WAIT'.
Now you can do:
and the item will stay.Code: Select all
ACTOR MagicThingy : Inventory { +INVBAR Inventory.MaxAmount 1 states { Spawn: RKEY A 4 BKEY A 4 YKEY A 4 loop Use: RKEY A 1 A_JumpIfInventory("Mana1", 10, 2) RKEY A 1 A_PlaySound("*usefail") Fail RKEY A 1 A_TakeInventory("Mana1", 10) RKEY A 1 HealThing(5) Fail } }
1. Can the GiveInventory check be made to fail if the item being checked is below a certain amount?
2. If A_CustomMissile/FireCustomMissile (whichever) is in the use state, does it fire from the player?
- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
- TheDarkArchon
- Posts: 7656
- Joined: Sat Aug 07, 2004 5:14 am
- Location: Some cold place
Code: Select all
Use:
RKEY A 1 A_JumpIfInventory("Mana1", 10, 2)
RKEY A 1 A_PlaySound("*usefail")
Fail
RKEY A 1 A_TakeInventory("Mana1", 10)
RKEY A 1 A_GiveInventory("Crap",10)
Stop