Using this method just keeps the weapon in that position giving me the maximum amount of ammo. But that's not what i was looking for: i want it to respawn after a while giving me a normal ammo as usual.Klofkac wrote: It might not be good thing, but try replacing the Stop in PickupWeapon with Fail.
Custom Inventory & Respawn
- The_Spartan
- Posts: 79
- Joined: Fri Oct 12, 2012 1:12 pm
- Location: Italy
- Contact:
RE: Custom Inventory & Respawn
RE: Custom Inventory & Respawn
hmm, there is a flag called ALWAYSRESPAWN, not sure if it works with inventory items... It should do the thing, I hope.
And you can use Inventory.RespawnTics for changing the delay when the item appears.
And you can use Inventory.RespawnTics for changing the delay when the item appears.
Last edited by Klofkac on Sat Mar 22, 2014 8:29 pm, edited 1 time in total.
𝕂𝕝𝕠𝕗𝕜𝕒𝕔
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Custom Inventory & Respawn
Sure, send me a PM with it.The_Spartan wrote: They just don't work. I think they do ONLY in Decorate Expressions.
Yes, i can send you the wad. I would be very grateful to you if you could fix this annoying problem for me. Private Message?
First, ALWAYSRESPAWN is for monsters only.Klofkac wrote: hmm, there is a flag called ALWAYSRESPAWN, not sure if it works with inventory items... It should do the thing, I hope.
And you can use Inventory.RespawnTics for changing the delay when the item appears.
And second, item respawning gotta be enabled for Inventory.RespawnTics to work.
But i have another idea which probably will make it stay there after picking it up. I'll try it when he PM's me the wad.
Last edited by Vincent(PDP) on Sun Mar 23, 2014 8:01 am, edited 1 time in total.
- The_Spartan
- Posts: 79
- Joined: Fri Oct 12, 2012 1:12 pm
- Location: Italy
- Contact:
RE: Custom Inventory & Respawn
Tried ALWAYSRESPAWN. It doesn't work.
Anyway, Vincent, I sent you the pk3 :D
Anyway, Vincent, I sent you the pk3 :D
Last edited by The_Spartan on Sun Mar 23, 2014 7:40 pm, edited 1 time in total.
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Custom Inventory & Respawn
He's already tried that, read the previous posts...Klofkac wrote: It might not be good thing, but try replacing the Stop in PickupWeapon with Fail.
Fíxed it!
http://www.mydoomsite.com/WADS/general% ... ch%202.pk3
Last edited by Vincent(PDP) on Wed Mar 26, 2014 2:05 pm, edited 1 time in total.
- The_Spartan
- Posts: 79
- Joined: Fri Oct 12, 2012 1:12 pm
- Location: Italy
- Contact:
RE: Custom Inventory & Respawn
I saw, but... It gives the maximum amount of ammo to the picker and just keeps the weapon there. I want the weapon to give you the standard amount of ammo, disappear and then respawn after a while.
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Custom Inventory & Respawn
You said you wanted them to "not disappear"... -.-The_Spartan wrote: I saw, but... It gives the maximum amount of ammo to the picker and just keeps the weapon there. I want the weapon to give you the standard amount of ammo, disappear and then respawn after a while.
Well change the 'Fail' on pickup to 'Stop' and then remove the two slashes before Inventory.RespawnTics
Oh, and on pickup, add:
Code: Select all
WFAX A 0 A_JumpIfInventory("FWeapAxe", 1, "Failing")
Last edited by Vincent(PDP) on Wed Mar 26, 2014 5:37 pm, edited 1 time in total.
- The_Spartan
- Posts: 79
- Joined: Fri Oct 12, 2012 1:12 pm
- Location: Italy
- Contact:
RE: Custom Inventory & Respawn
Nothing. It just solved the problem of the ammo and stuff, but the items still don't respawn. I also tried to host a team game server, and they don't respawn there either.
This is the full code:
This is the full code:
ACTOR AxeGiver : CustomInventory
{
SpawnID 27
Game Doom
Inventory.RespawnTics 35
Tag "Timon's Axe"
Inventory.PickupMessage "$TXT_WEAPON_F2"
//$Category Weapons
VisibleToPlayerClass "Fighter"
States
{
Spawn:
WFAX A -1
Stop
Pickup:
WFAX A 0 A_JumpIfInventory("ImAMage", 1, "Failing")
WFAX A 0 A_JumpIfInventory("ImACleric", 1, "Failing")
WFAX A 0 A_JumpIfInventory("ImAMarine", 1, "Failing")
WFAX A 0 A_JumpIfInventory("Imbj", 1, "Failing")
WFAX A 0 A_JumpIfInventory("ImCorvus", 1, "Failing")
WFAX A 0 A_JumpIfInventory("FWeapAxe", 1, "Failing")
goto PickupWeapon
Failing:
WFAX A 1
Stop
PickupWeapon:
WFAX A 0 A_GiveInventory("FWeapAxe", 1)
Stop
}
}
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Custom Inventory & Respawn
It respawned when i tried it. :/
Did you turn on the Respawn items flag?
Did you turn on the Respawn items flag?
Last edited by Vincent(PDP) on Thu Mar 27, 2014 12:30 pm, edited 1 time in total.
- The_Spartan
- Posts: 79
- Joined: Fri Oct 12, 2012 1:12 pm
- Location: Italy
- Contact:
RE: Custom Inventory & Respawn
I just turned on +ALWAYSRESPAWN.
I don't think they need those anyway.
I don't think they need those anyway.
RE: Custom Inventory & Respawn
Use a RandomSpawner to create the pickups. RandomSpawner clears the DROPPED flag, allowing the item to respawn.
Code: Select all
AxeRandomSpawner : RandomSpawner
{
DropItem "AxeGiver"
}- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Custom Inventory & Respawn
ALWAYSRESPAWN isn't the flag i meant... You gotta turn the respawn items flag on in the "Gameplay Options".The_Spartan wrote: I just turned on +ALWAYSRESPAWN.
I don't think they need those anyway.
- The_Spartan
- Posts: 79
- Joined: Fri Oct 12, 2012 1:12 pm
- Location: Italy
- Contact:
RE: Custom Inventory & Respawn
Tried. Still nothing.
I think it's time for "Plan B".
Is there any way I can avoid standard weapons to be picked up from certain classes without using an external pickup method that includes an inventory item?
I think it's time for "Plan B".
Is there any way I can avoid standard weapons to be picked up from certain classes without using an external pickup method that includes an inventory item?
RE: Custom Inventory & Respawn
There is a method in latest ZDoom, but of course Zandronum is years behnid so...
𝕂𝕝𝕠𝕗𝕜𝕒𝕔
RE: Custom Inventory & Respawn
I used CustomInventory in my classes mod and it worked just fine.
Give WeaponID# items to the classes to make them pick up what you want. If you don't want them to pickup anything I suppose redirecting them to Failure should work. The weapon's going to stay on the map forever no matter how many times you will pick it up.
Code: Select all
ACTOR WeaponID1 : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
+INVENTORY.UNDROPPABLE
}
ACTOR WeaponID2 : Inventory
{
Inventory.Amount 1
Inventory.MaxAmount 1
+INVENTORY.UNDROPPABLE
}
ACTOR WeaponSlot1 : CustomInventory Replaces Chainsaw
{
Inventory.PickupMessage ""
States
{
Spawn:
CSAW A -1
Stop
Pickup:
TNT1 A 0 A_JumpIfInventory("WeaponID1", 0, "PickupID1")
TNT1 A 0 A_JumpIfInventory("WeaponID2", 0, "PickupID2")
PickupID1:
TNT1 A 0 A_JumpIfInventory("Chainsaw1", 1, "Failure")
TNT1 A 0 A_GiveInventory("Chainsaw1", 1)
TNT1 A 0 A_SetBlend("FFFF00", 0.1, 5)
//TNT1 A 0 A_Log("\cgYou got the chainsaw!") There's no A_Log in Zan 1.2 (it's in 2.0) but I suppose you can use ACS for pickup messages.
TNT1 A 0 A_PlaySoundEx("misc/w_pkup", CHAN_VOICE)
Goto Success
PickupID2:
TNT1 A 0 A_JumpIfInventory("Chainsaw2", 1, "Failure")
TNT1 A 0 A_GiveInventory("Chainsaw2", 1)
TNT1 A 0 A_SetBlend("FFFF00", 0.1, 5)
//TNT1 A 0 A_Log("\cgYou got another chainsaw!")
TNT1 A 0 A_PlaySoundEx("misc/w_pkup", CHAN_VOICE)
Goto Success
Failure:
TNT1 A 0
Fail
Success:
TNT1 A 0
Fail
}
}
Last edited by Gardevoir on Fri Mar 28, 2014 3:35 pm, edited 1 time in total.
Never forget... 8.10.2012
(O+|+<) ~*
(O+|+<) ~*
HI
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Custom Inventory & Respawn
He wanted the weapon to disappear for a while, and i already made it work staying...
- The_Spartan
- Posts: 79
- Joined: Fri Oct 12, 2012 1:12 pm
- Location: Italy
- Contact:
RE: Custom Inventory & Respawn
Tried something different this time:
DECORATE:
DECORATE:
ACS:ACTOR AxeGiver : FWeapAxe
{
VisibleToPlayerClass "Fighter"
States
{
Spawn:
TNT1 A 0 A_Jumpif(ACS_ExecuteWithResult(601,1) == 1,"Spawn2")
Stop
Spawn2:
WFAX A -1
Stop
}
}
Still nothing, probably due to the fact that checks the activator's inventory, being the weapon while it is in the state of Spawn.#library "script2"
#include "zcommon.acs"
Script 601 (int arg0)
{
if(PlayerClass(PlayerNumber()) == arg0)
{
SetResultValue(1);
print(s:"yes");
}
else
{
SetResultValue(0);
}
}
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Custom Inventory & Respawn
Well PlayerNumber() checks the activating player's number. And since you did it in an actor's spawn state, there's no activating player. And, if I'm right, the PlayerNumber() will be set to the server (-1).The_Spartan wrote: Tried something different this time:
DECORATE:
ACS:ACTOR AxeGiver : FWeapAxe
{
VisibleToPlayerClass "Fighter"
States
{
Spawn:
TNT1 A 0 A_Jumpif(ACS_ExecuteWithResult(601,1) == 1,"Spawn2")
Stop
Spawn2:
WFAX A -1
Stop
}
}
Still nothing, probably due to the fact that checks the activator's inventory, being the weapon while it is in the state of Spawn.#library "script2"
#include "zcommon.acs"
Script 601 (int arg0)
{
if(PlayerClass(PlayerNumber()) == arg0)
{
SetResultValue(1);
print(s:"yes");
}
else
{
SetResultValue(0);
}
}
Last edited by Vincent(PDP) on Sun Mar 30, 2014 3:13 pm, edited 1 time in total.
- The_Spartan
- Posts: 79
- Joined: Fri Oct 12, 2012 1:12 pm
- Location: Italy
- Contact:
RE: Custom Inventory & Respawn
That's right, and what i'm going to do next? I have no ideas.Well PlayerNumber() checks the activating player's number. And since you did it in an actor's spawn state, there's no activating player. And, if I'm right, the PlayerNumber() will be set to the server (-1).
- Vincent(PDP)
- Forum Regular
- Posts: 527
- Joined: Thu Mar 14, 2013 7:35 pm
- Location: Sweden
- Clan: My DOOM site
- Clan Tag: <MDS>
- Contact:
RE: Custom Inventory & Respawn
Code: Select all
Script 123 OPEN
{
SetActivator(-1);
ConsoleCommand("SV_ItemRespawn 1");
}