[Added] A Christmas present for ZDoom

Moderator: GZDoom Developers

Postby The Ultimate DooMer » Mon May 23, 2005 5:06 pm

Killo Zapit wrote:Yay! Although I have to say, I am surprised about the addition of a PickUp state. I thought you could just make items use themselves automatically on pickup anyway.


Does that mean we have custom inventory items (Hexen style) now Graf?
User avatar
The Ultimate DooMer
Will you start the fans please!
 
Joined: 15 Jul 2003
Location: Industrial Zone

Postby Graf Zahl » Mon May 23, 2005 5:30 pm

Yes. You can do anything you can do with code pointers or action specials.

Here's one completely useless test item:

Code: Select allExpand view
ACTOR TestItemX : Inventory
{
   Inventory.PickupMessage "Picked up some crap!"
   +INVBAR
   Inventory.Icon MEDIA0
   States
   {
   Spawn:
      MEDI A -1
      Stop
   
   Use:
      TNT1 A 0 A_JumpIfInventory("RedCard", 1, 3)
      TNT1 A 0 A_GiveInventory("InvulnerabilitySphere")
      TNT1 A 0 A_FireCustomMissile("Rocket", 0, 0)
      TNT1 A 0 A_GiveInventory("BlueArmor")
      Stop
   Pickup:
      TNT1 A 0 A_GiveInventory("Megasphere")
      TNT1 A 0 Door_Open(3, 150)
      TNT1 A 0 A_SelectWeapon("Fist")
      Stop
   }
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Daniel » Mon May 23, 2005 5:44 pm

Graf Zahl wrote:Yes. You can do anything you can do with code pointers or action specials.




Is it available on the ZDoom version linked in ZDoom Wiki?
User avatar
Daniel
 
Joined: 04 Jul 2004

Postby Graf Zahl » Mon May 23, 2005 5:54 pm

No. You'd have to recompile it again. I could do that but I simply can't host the file anywhere.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby deathz0r » Tue May 24, 2005 2:43 am

Graf Zahl wrote:No. You'd have to recompile it again. I could do that but I simply can't host the file anywhere.
Email me (deathz0r at zdaemon.org) and I'll host it in no time (from when I read my email box)!
User avatar
deathz0r
ftw
 
Joined: 15 Jul 2003
Location: Land with them kangaroo
Twitch ID: deatsaw
Operating System: Other Linux 64-bit
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: ATI/AMD with Vulkan Support

Postby David Ferstat » Tue May 24, 2005 7:30 am

I'll happily mirror it, also.
User avatar
David Ferstat
Oh dear, I think you'll find reality is on the blink again.
 
Joined: 16 Jul 2003
Location: Perth, Western Australia

Postby DoomRater » Tue May 24, 2005 8:37 am

And then we can have some extreme items that- well, ideas were already presented around the board on that... So how about items that don't use themselves up in DECORATE inventory? I wanna make a CD player for example, and you use the CD's in your inventory to change the music.
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Postby Graf Zahl » Tue May 24, 2005 9:14 am

DoomRater wrote:I wanna make a CD player for example, and you use the CD's in your inventory to change the music.



That shouldn't be a problem. The CD player would just be an item with no function. These can't be used and just stay in the inventory as inert items. For the CD's you'd probably need some ACS scripting to do it properly but it is doable.

But before I recompile the new version I'll re-add some code that has been submitted elsewhere and is already in the .97 code base. I think Thursday evening I can send it to those who want to host it. Sorry but tomorrow I won't have any time to do it.


EDIT:

I'll delay this until the weekend. I just tried playing around with Kaiser's dialog compiler for Strife and there is one thing I'd like to add to make it more useful: Special items that perform some actions when dropped by monsters. This is one of the features Strife uses and some DECORATE support for it might be nice.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby DoomRater » Tue May 24, 2005 11:35 am

ACS scripting I figured would be necessary but then again that's not a problem as long as it's for a TC. And what would be better than a Maniac Mansion TC? (random idea for the day)

Oh, that extra feature is making me drool. I don't know quite what to do with it yet... but unlike DS's extra features, these are more likely to be used.
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Postby Grubber » Tue May 24, 2005 12:11 pm

If you still haven't got it compiled, grab it here.
User avatar
Grubber
I can wire anything directly into anything. I am the professor!
 
Joined: 15 Oct 2003
Location: Czech Republic

Postby Graf Zahl » Tue May 24, 2005 12:18 pm

Thanks. Although I'll still add the feature mentioned above.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Grubber » Tue May 24, 2005 12:47 pm

You're welcome ;). Of course add the feature, I'll compile it again.
User avatar
Grubber
I can wire anything directly into anything. I am the professor!
 
Joined: 15 Oct 2003
Location: Czech Republic

Postby Killo Zapit » Wed May 25, 2005 9:19 pm

Graf Zahl wrote:
DoomRater wrote:I wanna make a CD player for example, and you use the CD's in your inventory to change the music.



That shouldn't be a problem. The CD player would just be an item with no function. These can't be used and just stay in the inventory as inert items. For the CD's you'd probably need some ACS scripting to do it properly but it is doable.


I think what he wants is an inventory item that can be used but dosn't go away. The only way I know of to do that is like this:

Code: Select allExpand view
ACTOR MagicThingy : Inventory
{
+INVBAR
Inventory.MaxAmount 2
states
   {
   Spawn:
      RKEY A 4
      BKEY A 4
      YKEY A 4
      loop
   Use:
      RKEY A 1 A_GiveInventory("MagicThingy")
      RKEY A 1 A_JumpIfInventory("Mana1", 10, 2)
      RKEY A 1 A_PlaySound("*usefail")
      Stop
      RKEY A 1 A_TakeInventory("Mana1", 10)
      RKEY A 1 HealThing(5)
      Stop
   }
}
User avatar
Killo Zapit
PIGBUTT LIVES AGAIN!
 
Joined: 17 Jul 2003
Location: Most likely sleeping.

Postby Graf Zahl » Thu May 26, 2005 2:52 am

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:

Code: Select allExpand view
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
   }
}


and the item will stay.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Anakin S. » Thu May 26, 2005 11:16 pm

Graf Zahl wrote:Yes. You can do anything you can do with code pointers or action specials.

Here's one completely useless test item:

Code: Select allExpand view
ACTOR TestItemX : Inventory
{
   Inventory.PickupMessage "Picked up some crap!"
   +INVBAR
   Inventory.Icon MEDIA0
   States
   {
   Spawn:
      MEDI A -1
      Stop
   
   Use:
      TNT1 A 0 A_JumpIfInventory("RedCard", 1, 3)
      TNT1 A 0 A_GiveInventory("InvulnerabilitySphere")
      TNT1 A 0 A_FireCustomMissile("Rocket", 0, 0)
      TNT1 A 0 A_GiveInventory("BlueArmor")
      Stop
   Pickup:
      TNT1 A 0 A_GiveInventory("Megasphere")
      TNT1 A 0 Door_Open(3, 150)
      TNT1 A 0 A_SelectWeapon("Fist")
      Stop
   }
}


But this wouldn't give the player those items, and instead would give them to the TestItemX, right? Is there a way to make it give the item to the player?
User avatar
Anakin S.
Am I evil?
 
Joined: 29 Nov 2003
Location: A long time ago in a galaxy far, far away...

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests