The Doommer Posted September 8, 2015 I want to add a weapon which is only usable in one level , and then replaces with another weapon which is going to be used in every level (don't count the level that the one level use weapon uses) Can i do this with DECORATE , etc ? 0 Share this post Link to post
scifista42 Posted September 8, 2015 No, but you can do it by manipulating player's inventory via ACS - upon start of the next level, check if the player has the weapon, and if he does, take it from him and give him the other weapon. In practice: Make the 2 weapons normally in DECORATE. Let's say you named them "TheDoommersWeapon1" and "TheDoommersWeapon2". Then put this ACS script to your second map:#include "zcommon.acs" script 1 ENTER { if(CheckInventory("TheDoommersWeapon1")) { TakeInventory("TheDoommersWeapon1",1); GiveInventory("TheDoommersWeapon2",1); } } 0 Share this post Link to post
Angry Saint Posted September 8, 2015 I would do this with ACS scripts, removing the weapon at the end of the level. EDIT: exactly what scifista said. 0 Share this post Link to post
The Doommer Posted September 8, 2015 scifista42 said:No, but you can do it by manipulating player's inventory via ACS - upon start of the next level, check if the player has the weapon, and if he does, take it from him and give him the other weapon. In practice: Make the 2 weapons normally in DECORATE. Let's say you named them "TheDoommersWeapon1" and "TheDoommersWeapon2". Then put this ACS script to your second map:#include "zcommon.acs" script 1 ENTER { if(CheckInventory("TheDoommersWeapon1")) { TakeInventory("TheDoommersWeapon1",1); GiveInventory("TheDoommersWeapon2",1); } } There is a problem here : That weapon is in a secret , not given by normal way... EDIT : I think it was my mistake , sorry. Thanks 0 Share this post Link to post
scifista42 Posted September 8, 2015 I don't see a problem in that. EDIT: OK. 0 Share this post Link to post
The Doommer Posted September 10, 2015 I want when the doomguy takes the weapon , it gets replace by a weapon, how ? 0 Share this post Link to post
Chezza Posted September 10, 2015 The Doommer said:I want when the doomguy takes the weapon , it gets replace by a weapon, how ? Based on what your saying you might as well just make a new weapon in Decorate and place the file into your wad via Slade for pickup. However if you're saying you want one level where the player is carrying a shotgun and when he picks up a health bonus (or anything you set it to) and suddenly the shotgun changes into a custom new weapon for the remainder of the level you can do so via ACS similar to the example above. You will also need to include the custom resource in your wad file. Change the ENTER into (void) and set the specific "Thing" to have script execute 1. #include "zcommon.acs" script 1 (void) { if(CheckInventory("TheDoommersWeapon1")) { TakeInventory("TheDoommersWeapon1",1); GiveInventory("PieceOfCheese",1); } } However with my technique in mind there might be a fatal flaw, that being if you pick up the shotgun it may include both your new and old weapon in the inventory or just replace your current back to the original weapon. Or not, I never tried this before. 0 Share this post Link to post
scifista42 Posted September 10, 2015 Alternatively: In DECORATE, redefine the "Select" state of the 2nd weapon to remove the 1st weapon from player's inventory. Example: Select: ABCD A 0 A_TakeInventory("MyFirstWeapon",1) Select2: ABCD A 1 A_Raise loop 0 Share this post Link to post
The Doommer Posted September 12, 2015 A question by the way... Can i set their slot number both as 0 ? won't ZDoom generate an error ? 0 Share this post Link to post
snapshot Posted September 12, 2015 The Doommer said:A question by the way... Can i set their slot number both as 0 ? won't ZDoom generate an error ? yes you can, using KEYCONF . 0 Share this post Link to post
The Doommer Posted September 12, 2015 DMGUYDZ64 said:yes you can, using KEYCONF . I used the DECORATE for that... Looking at KEYCONF part of zdoom gave me that the setting the slot not supported anymore. (by KEYCONF) 0 Share this post Link to post
snapshot Posted September 12, 2015 Do it this way http://zdoom.org/wiki/Weapon_slots 0 Share this post Link to post