Pickup Benefits?

Moderator: GZDoom Developers

LK873
Posts: 274
Joined: Mon Aug 30, 2004 10:54 am
Location: Ontario, Canada

Pickup Benefits?

Post by LK873 »

I've been thinking about this for a while, and I think a feature idea taken from DDF would be nice in DECORATE to rid the need for any scripting. Firstly...(Note that this was taken from Things.ddf)

[HEALTH_POTION:2014]
RADIUS=20;
HEIGHT=16;
PICKUP_BENEFIT=HEALTH(1:200);
PICKUP_SOUND=ITEMUP;
PICKUP_MESSAGE=GotHealthPotion;
TRANSLUCENCY=60%;
RESPAWN_EFFECT=ITEM_RESPAWN;
SPECIAL=COUNT_AS_ITEM,SPECIAL;

STATES(IDLE)=BON1:A:6:NORMAL:NOTHING,
BON1:B:6:NORMAL:NOTHING,
BON1:C:6:NORMAL:NOTHING,
BON1:D:6:NORMAL:NOTHING,
BON1:C:6:NORMAL:NOTHING,
BON1:B:6:NORMAL:NOTHING;

I think something like Pickup.Benefit would be useful so that you don't have to script a special onto the new pickup you have created.

And this is hypothetical, but if Randy DOES include Timmie's code (or writes his own) for Dynamic Lights there should, of course, be a way to attach them to states of objects and actors (and weapons?).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48538
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Wait for 2.0.97. It (or the inofficial .96 build) will support customizable pickup items. The code is already there.
LK873
Posts: 274
Joined: Mon Aug 30, 2004 10:54 am
Location: Ontario, Canada

Post by LK873 »

I already have the updated .96 you made, how would I go about doing it? For example, say I make a different health potion that gives you 5 health instead of 1, how would I define this in DECORATE?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48538
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

ACTOR Health5 : HealthBonus
{
Inventory.Amount 5
}
LK873
Posts: 274
Joined: Mon Aug 30, 2004 10:54 am
Location: Ontario, Canada

Post by LK873 »

But what I meant above was TRUE defining of what you get, this method just basically gives you five of the inherited item. What if you don't inherit from an item?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

You have to inherit from something, otherwise it won't work.

Still makes the system pretty damn powerful, though.
LK873
Posts: 274
Joined: Mon Aug 30, 2004 10:54 am
Location: Ontario, Canada

Post by LK873 »

It's powerful, yes, but it can be expanded upon.

I'm still trying to think up a good method on how to do it though...
LK873
Posts: 274
Joined: Mon Aug 30, 2004 10:54 am
Location: Ontario, Canada

Post by LK873 »

Like, okay, what if I made a red health potion and when you picked it up, it made you lose 5 health, you can't inherit anything to do that, so what would be a scriptless, pure DECORATE way to do that, and if there isn't one, that's the point of my first post.
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

No, and there's no way to do it in EDGE without RTS either.

To have a red potion, however:

Code: Select all

ACTOR Health5 : HealthBonus
{
    Inventory.Amount 5
    States
    {
     Spawn:
          BON2 ABCDCB 6
          Loop
    }
}
User avatar
Sir_Alien
Posts: 863
Joined: Sun Aug 29, 2004 6:15 am
Location: Sydney, Australia

Post by Sir_Alien »

How would that make you lose 5 points of health?
User avatar
TheDarkArchon
Posts: 7656
Joined: Sat Aug 07, 2004 5:14 am
Location: Some cold place

Post by TheDarkArchon »

In response to LK873, I wrote:No, and there's no way to do it in EDGE without RTS either.
That said, I haven't tried this yet:

Code: Select all

Inventory.Amount -5
killingblair
Posts: 937
Joined: Mon Oct 04, 2004 9:16 pm

Post by killingblair »

Graf, did I ever tell you that you rock? :)

Return to “Closed Feature Suggestions [GZDoom]”