Mancubus
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > [ZDoom] Permanent Powerups
 
Author
All times are GMT. The time now is 08:15. Post New Thread    Post A Reply
Membrain
Member


Posts: 493
Registered: 09-10


Hey all. I'm having a bit of trouble here. I'm trying to make a fairly simple powerup that is entirely permanent. That is, the player picks the item up once and then it stays in his inventory between levels and everything. So far, it works fine when first picked up, but I just can't seem to get it to carry over into the next level.

Here's what I've got so far:

code:
ACTOR Test_Pickup : CustomInventory 10001 { + INVENTORY.AUTOACTIVATE + INVENTORY.ALWAYSPICKUP States { Spawn: TNT1 A 4 loop Use: TNT1 A 0 A_GiveInventory ("JumpBooster", 1) TNT1 A 0 A_GiveInventory ("Test", 1) TNT1 A 0 stop } } ACTOR Test : CustomInventory { + INVENTORY.AUTOACTIVATE + INVENTORY.ALWAYSPICKUP + INVENTORY.PERSISTENTPOWER + INVENTORY.HUBPOWER Inventory.Amount 1 Inventory.MaxAmount 1 Tag "test" States { Spawn: TNT1 A 4 loop Use: TNT1 A 0 fail } }


JumpBooster is a powerupgiver just like on the ZDoom wiki. Anyone have an idea as to why this isn't sticking around?

Old Post 01-11-13 06:57 #
Membrain is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Blue Shadow
Member


Posts: 279
Registered: 09-12


What's the point of the "Test" item, exactly?

Also, if I'm not mistaken, the INVENTORY.PERSISTENTPOWER flag works only on the power-ups themselves, not the actual power-up givers or custom inventory items.
code:
ACTOR PowerPerHighJump : PowerHighJump { Powerup.Duration 0x7FFFFFFF // "Infinite" duration +INVENTORY.PERSISTENTPOWER +INVENTORY.UNDROPPABLE // If you don't want, it remove it +INVENTORY.UNTOSSABLE // If you don't want, it remove it // The rest of the definition... } ACTOR PermanentHighJump : PowerupGiver { Powerup.Type "PerHighJump" // The rest of the definition... }

Old Post 01-11-13 07:36 #
Blue Shadow is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Membrain
Member


Posts: 493
Registered: 09-10


Right now? It gives a permanent high jump powerup. Hrm... doesn't seem to be working as of yet. Here's my current code for the powerup and powerupgiver.

code:
ACTOR JumpBooster : PowerupGiver { inventory.maxamount 0 powerup.type "JumpBooster_Powerup" + AUTOACTIVATE states { Spawn: MEGA ABCD 4 bright loop } } ACTOR JumpBooster_Powerup : HighJump { powerup.duration 0x7FFFFFFF + INVENTORY.PERSISTENTPOWER + INVENTORY.UNDROPPABLE + INVENTORY.UNTOSSABLE states { Spawn: MEGA ABCD 4 bright loop } }


I'm getting errors with regard to the duration. *Sigh* Wish I was a little less green with Decorate, but we all have to start somewhere.

Old Post 01-11-13 07:54 #
Membrain is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Blue Shadow
Member


Posts: 279
Registered: 09-12



Membrain said:
code:
ACTOR JumpBooster_Powerup : HighJump


It should be PowerHighJump, not just HighJump.

Also, you might want to put the power-up giver's definition after the power-up's, otherwise ZDoom will complain.

Old Post 01-11-13 08:08 #
Blue Shadow is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Membrain
Member


Posts: 493
Registered: 09-10


Aha! There we go. Thanks very much. This is a lot more concise than what I had, too.

Old Post 01-11-13 08:23 #
Membrain is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 08:15. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > [ZDoom] Permanent Powerups

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.