Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
hardcore_gamer

How can I make the player start with no weapons?

Recommended Posts

I am making a map for Zdoom in hexen format and I don't want the player to start with any weapons, not even the pistol.

Is there I way I can accomplish this?

Share this post


Link to post

As you're using ZDoom, I know for a fact that there is. And I know it involves scripts. BRB...

EDIT: I was expecting a long quest for the answer; turns out that it was the first Google search result. On this forum, too, as it were.


Basically, you need to hit F10 in Doom Builder and paste this:

#include "zcommon.acs"

script 1 enter
{
ClearInventory();
}
I believe that's all you'd need. Gonna test it out myself, now...
EDIT2: tested; works.

EDIT3: If you'd like to know more about scripting, I'd recommend the following pages.

http://zdoom.org/wiki/A_quick_beginner%27s_guide_to_ACS
http://zdoom.org/wiki/Tutorials#ACS_Related
http://www.zdoom.org/wiki/Action_specials

P.S. credit goes to Kappes Buur for getting me into this wonderful shit. [:

Share this post


Link to post

Did some quick research; think it would look like this, then:

script 1 ENTER
{        
    ClearInventory();
    GiveInventory("Fist", 1);
}
Haven't tested it, but I'm pretty that should work,

EDIT: Just tested it, and it works. Only problem I can see is that the player starts out with no weapon selected, so he has to press "1" in order to switch to fist.

Share this post


Link to post
schwerpunk said:

Only problem I can see is that the player starts out with no weapon selected, so he has to press "1" in order to switch to fist.

I think that happens only if you use noswitchonpickup.

Share this post


Link to post

Ah... Okay, a bit more research. I've tested this, and it works, even if you've got noswitchonpickup:

script 1 ENTER
{        
    ClearInventory();
    GiveInventory("Fist", 1);
    SetWeapon("Fist");
}
I'm just now learning scripting myself, so maybe there's an easier way to do this, but it looks pretty good to me.

Share this post


Link to post

It doesn't need to be scripted. This method is map independent (ie you can load it with any simple map ad it will work).

MAPINFO

GameInfo
{
   PlayerClasses = "MyDoomPlayer"
}
DECORATE
ACTOR MyDoomPlayer : DoomPlayer
{
	Player.StartItem "Fist"
}

Here it is as a PK3. Just load the file and it should do what you want.

http://www.zen64060.zen.co.uk/examples/nopistol.pk3

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×