Small "Challenge": Brightness Megawad

Archive of the old editing forum
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.
User avatar
Medricel
Posts: 1138
Joined: Sat Nov 20, 2004 9:47 am

Post by Medricel »

Question: Are we allowed to strip the player of thier inventory at map start? It is unknown where our maps might fall in the WAD, so we are unable to anticipate what weapons the player might have upon reaching the map, so it would be better to have the player start under the mapper's terms.
User avatar
Caligari87
Admin
Posts: 6241
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Post by Caligari87 »

Good idea. Do it if you please; it might help.

In fact, Shinjanji, can you post a simple chunk of ACS so that people who don't know how to code can simply import it and strip the player at start? That would be good. I'll make this a requirement too; might help if the WAD ever gets into newstuff. No more "some maps should be played in order, some not, so less score" ;)

8-)
User avatar
Medricel
Posts: 1138
Joined: Sat Nov 20, 2004 9:47 am

Post by Medricel »

Okay, here's a simple script. I take the player's bullets after giving them the pistol because I don't like to anticipate how many bullets the Pistol will give.

EDIT: Revised version farther down

EDIT: This would be better as an ENTER script, not an OPEN.

EDIT2: Whoops! Forgot thier fists! lol

EDIT3: Rearranged code so the player starts iwth thier pistol up. Sheesh, tonight is not my night for ACS!
Last edited by Medricel on Tue Feb 28, 2006 11:54 am, edited 2 times in total.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Hmm i'd have a go at this but I haven't mapped since last year.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

@Shinjani: two problems with code- players playing on easiest will have 100 bulets (unavoidable, most likely), and players that have NEVERSWITCHONPICKUP will not have a weapon selected. You should use SelectWeapon("Pistol") in there to be absolutely sure all players have the pistol selected. This effect was broken for me on Adventures in Impse because of this.
User avatar
Medricel
Posts: 1138
Joined: Sat Nov 20, 2004 9:47 am

Post by Medricel »

DoomRater wrote:@Shinjani: two problems with code- players playing on easiest will have 100 bulets (unavoidable, most likely)
...WTF. I can't even explicitly give a player a set amount of ammo? Sheesh! (BTW, it happens on Nightmare, too)... Whatever, at least you know how many bullets they'll have, and can compensate for it. I really don't feel like writing a conditional statement based on whatever skill the player's at JUST so I can give them exactly 50 bullets.
DoomRater wrote:... and players that have NEVERSWITCHONPICKUP will not have a weapon selected. You should use SelectWeapon("Pistol") in there to be absolutely sure all players have the pistol selected. This effect was broken for me on Adventures in Impse because of this.
Hmm, I thought I always had that on. O.o Either way, thanks for letting me know this.

EDIT: Err, I can't find any info in the Wiki about any SelectWeapon(<weapon>) command.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

DoomRater wrote:unavoidable
Nonsense. Just use GameSkill().
Shinjanji wrote:I really don't feel like writing a conditional statement based on whatever skill the player's at JUST so I can give them exactly 50 bullets.
It would take 30 seconds...
Shinjanji wrote:Err, I can't find any info in the Wiki about any SelectWeapon(<weapon>) command.
That's because it's "SetWeapon"
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

Well, now the rules have been bent to my approval ( :P ) I think I might have to submit a very strange etheral level for a boss level, just for the fun of it. Only problem is spriting the new monster, but my plans allow for a simplistic approach to the spriting (hopefully it won't look too crap).

Might just put all of my current projects on hold for a few days to do it. :D
User avatar
Medricel
Posts: 1138
Joined: Sat Nov 20, 2004 9:47 am

Post by Medricel »

Risen wrote:It would take 30 seconds...
I had just woken up at the time, and didn't feel like writing it then. :melancholy:
Risen wrote:That's because it's "SetWeapon"
O.o :stuppor:

Updated script. Better? (using || in an IF wasn't working for me)
EDIT: Jim has an updated version below
Last edited by Medricel on Tue Feb 28, 2006 12:47 pm, edited 1 time in total.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Post by DoomRater »

Risen wrote:
DoomRater wrote:unavoidable
Nonsense. Just use GameSkill().
GOD I'm rusty. I'm still thinking I'm working with DECORATE.
User avatar
Jim
Posts: 535
Joined: Mon Aug 11, 2003 10:56 am

Post by Jim »

Why write the same code twice in the switch statement?

Code: Select all

#include "zcommon.acs"

script 1 ENTER {
	ClearInventory();					//I strip thee of thy goods!
	GiveInventory("Fist", 1);			//Give them thier fists!
	GiveInventory("Pistol", 1);			//Give back the pistol
	TakeInventory("Clip", 999);			//No bullets. AT ALL. Precautionary step.
	Switch(GameSkill()) {
		case SKILL_VERY_EASY:
		case SKILL_VERY_HARD: GiveInventory("Clip", 25); break;	//ITYTD or Nightmare mode. 25 bullets.
		default: GiveInventory("Clip", 50);						//Not Nightmare or ITYTD. 50 bullets.
	}
	SetWeapon("Pistol");				//Make sure the player's using the pistol
}
User avatar
Medricel
Posts: 1138
Joined: Sat Nov 20, 2004 9:47 am

Post by Medricel »

lol, forgot about that.
User avatar
MaxPower8905
Posts: 55
Joined: Mon Oct 03, 2005 8:55 pm
Location: Caught somewhere in time...

Post by MaxPower8905 »

Cool! These new rules make things a lot better! I've already started making my map so if I don't get extremely lazy I should have it done in about a week.
User avatar
Phobus
Posts: 5984
Joined: Thu May 05, 2005 10:56 am
Location: London
Contact:

Post by Phobus »

I've done some of the spriting for the monster to be in my entry, however the individual sprites won't do it justice at all (my plans are pretty wierd), so you'll have to wait and fight it in my level, which will feature some homemade textures/flats for the purpose. This shouldn't take all that long, but don't hold your breath, I may find myself stuck on something.
User avatar
Caligari87
Admin
Posts: 6241
Joined: Thu Feb 26, 2004 3:02 pm
Preferred Pronouns: He/Him
Contact:

Post by Caligari87 »

First post updated with new ACS code. Thanks for the help :D :thumb:

Just a small consideration; I won't make it a requirement, though. If you're including custom sprites/textures/weapons, please try to make it small enough to attach here when zipped, if possible. EG, less than 255k. I don't want to be re-uploading the WRW, MRW and three full texture packs to /newstuff.

8-)
Locked

Return to “Editing (Archive)”