ellmo Posted May 8, 2004 Dormant weapons still can be picked up. Help. Any Zdoomers and ACS scripters, go to: http://forum.zdoom.org/viewtopic.php?t=2580 To understand my despair... 0 Share this post Link to post
Nmn Posted May 8, 2004 Not sure but perhaps place a sprite at a spot (weapon pickup sprite, but don't mark it as a pickup in DECORATE) and when the player steps on the weapon (i.e. triggers a script by tripping on of the ACS_Execute lines sorrounding the sprite) and when the playa triggers the line and the "if" is set to 0 (event blocked)-don't pickup weapon, but once the specific if was set to 1 (by another script) pickup the weapon-remove sprite from map and give the weapon, display hudmessage like "Picked up Automag..."-I know it's lame but that may be a way around.. 0 Share this post Link to post
ellmo Posted May 8, 2004 Hello, NMN. The question of weapon pick-ups is solved af for now. But I'm loosing temper on trying to run this Weapon limitation script properly!!!! FUCK FUCK FUCK! Even LilWhiteMo cannot help me this easily. I tried his solution, but I simply cannot increase the variable... and blah, blah, blah. Visit ZDoom forums to learn more. 0 Share this post Link to post
Chopkinsca Posted May 8, 2004 ellmo said:FUCK FUCK FUCK! Even LilWhiteMo cannot help me this easily. I tried his solution, but I simply cannot increase the variable... and blah, blah, blah. Set all the weapon pickups to have a special of 80. Then have a script that raises a variable for how many weapons you have. You need a check function to make sure the number of weapons you have now is not above the weapon limit (which will be another variable declared outside of the script). When you spawn the weapon drops, you will have to spawn them with a TID and use setthingspecial to give it a ACS_execute special. str weaponnames[7] = { weapon names here }; int weapons_held, weaponmax; str currentweapon; script 100 (void) { weapons_held++; if(weapons_held > weaponmax){ dropweapon(); } } function void dropweapon(void) { if(checkweapon("Fist"){ terminate; } weapon_held --; checkweapon(); // spawn currentweapon in some way removeinventory(currentweapon); } function void checkweapon(void) { for(int i = 0, i <= 8, i++){ if(checkweapon(weaponname[i]){ currentweapon = weaponname[i]; terminate; } } } Something like that maybe. I didn't plan on writing it, but I did. It is just from my head and could be very wrong as it was done very quickly. ah, I see. If you pick up a new weapon and go over the limit, it would drop your current weapon, unless auto weapon switching was on. 0 Share this post Link to post