an inventory item that gives its self back infinately
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
an inventory item that gives its self back infinately
Is it possible? or at least, is it possible to constantly drop an item that gives the other item infinately? Im basically working on an Aliens style tracker that constantly scans using A_CheckSightOrRange using an inventory item.
Re: an inventory item that gives its self back infinately
Couldn't you just have the state that drops the item loop?
Re: an inventory item that gives its self back infinately
No, that'd require ACS or my ScriptedPowerup effect that never made it into ZDoom.
The issue is that CustomInventory items go through all their states instantaneously. So any loop you can achieve would be a 0-tic infinite loop; with the new item spawned and picked up in the same tic and so on.
The issue is that CustomInventory items go through all their states instantaneously. So any loop you can achieve would be a 0-tic infinite loop; with the new item spawned and picked up in the same tic and so on.
- David Ferstat
- Posts: 1113
- Joined: Wed Jul 16, 2003 8:53 am
- Location: Perth, Western Australia
- Contact:
Re: an inventory item that gives its self back infinately
Have you checked out the [wiki]Inventory[/wiki] page? There are a number of tools there, both ACS and DECORATE, for manipulating Inventory items.
Specifically, I can see [wiki]CheckInventory[/wiki]and [wiki]GiveInventory[/wiki].
I suggest a really basic ACS script, called as often as you think fit, something like this:
This script counts how many of SpecialInventoryItem you have; if you have less than 1, it gives you another.
Specifically, I can see [wiki]CheckInventory[/wiki]and [wiki]GiveInventory[/wiki].
I suggest a really basic ACS script, called as often as you think fit, something like this:
Code: Select all
if CheckInventory("SpecialInventoryItem") < 1
GiveInventory("SpecialInventoryItem", 1);
- Demolisher
- Posts: 1749
- Joined: Mon Aug 11, 2008 12:59 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Winchester, VA
- Contact:
Re: an inventory item that gives its self back infinately
Why didn't that make it in? That was a fabulously implemented idea (At least on the outside).Gez wrote:No, that'd require ACS or my ScriptedPowerup effect that never made it into ZDoom.
Re: an inventory item that gives its self back infinately
I dont get why you cant loop inventory objects, they should work like any other Things.
- XutaWoo
- Posts: 4005
- Joined: Sat Dec 30, 2006 4:25 pm
- Location: beautiful hills of those who are friends
- Contact:
Re: an inventory item that gives its self back infinately
They do.Ben2k9 wrote:I dont get why you cant loop inventory objects, they should work like any other Things.
If you loop any actor into a 0-tic state, then ZDoom will crash regardless of what kind of actor it is.
- NeuralStunner
-
- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: an inventory item that gives its self back infinately
Pretty sure CustomInventory ignores Loop.
- Demolisher
- Posts: 1749
- Joined: Mon Aug 11, 2008 12:59 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Winchester, VA
- Contact:
Re: an inventory item that gives its self back infinately
Why? It can still be useful with A_JumpIf.NeuralStunner wrote:Pretty sure CustomInventory ignores Loop.
Re: an inventory item that gives its self back infinately
Can't you just make the Use state run a GiveInventory script?
Re: an inventory item that gives its self back infinately
doesnt work.Cronyne wrote:Can't you just make the Use state run a GiveInventory script?
Re: an inventory item that gives its self back infinately
Any reason why? I've seen DECORATE refer to ACS scripts.
- Demolisher
- Posts: 1749
- Joined: Mon Aug 11, 2008 12:59 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Winchester, VA
- Contact:
Re: an inventory item that gives its self back infinately
Yea, me too, unless you provide us with details, your "doesnt work" is not going to be taken seriously.
However, if it is an acs problem, try not forgetting #Library "WHATEVER", the loadacs lump, with the library name in it, and check script refs.
However, if it is an acs problem, try not forgetting #Library "WHATEVER", the loadacs lump, with the library name in it, and check script refs.
Re: an inventory item that gives its self back infinately
oh I thought you meant A_giveinventory, sorry
Re: an inventory item that gives its self back infinately
Oh. That would cause confusion. =P
Well, give it a shot!
Well, give it a shot!