Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Epyo

Double the questions, double the fun!

Recommended Posts

Me again!

1-When a demon kills me it says "You got bit by a demon". So how do I change this?

2-In a script, how can I take away all the player's weapons?

Straight to the point.

Share this post


Link to post

you can't take away ALL the players weapons since (and I assume you're talking about zdoom here) zdoom can't deal with the player having no weapons. what you canb do is remove them all save the fists and pistol (taking away all bullets renders the pistol unuseable). anyways, the function you want is takeinventory() which has syntax as follows: takeinventory(str name, int amt), for a list of inventory items you can check out this: http://doom.vect.org:8080/acs/inventory.txt (also has more inventory info)

the second thing is done in the [STRINGS] block in a bex patch, check out massm_do for more examples (only wad I can think of off hand with changed obits...oh tei tenga had one), but simply put just do:

[STRINGS]
OB_DEMONHIT = was killed by something that used to be a demon
and that's pretty much it

(edit: err, answered inventory and then bex, but whatever, should be other way around heh)

Share this post


Link to post
The Ultimate DooMer said:

I don't suppose there's a way of getting death messages for new monsters replacing non-monster things?

Speaking of which, is it possible to have one of those message dee-lees pop up each time you kill a Hellspawn? I know it'd be annoying but its just a thought. :D

Share this post


Link to post
The Ultimate DooMer said:

I don't suppose there's a way of getting death messages for new monsters replacing non-monster things?

No, apparently not. I asked Randy about this some time ago and the obits are tied to the actual thing that does the killing. This is even the case if you do a bit of ID# swapping. eg if you ID swap the shotgun guy and a green pillar, the item that now looks like a shotgun guy will not have a specific obit, but will just use the generic "player died" instead.

Share this post


Link to post

Ok, so now the bex thing is working but that link to info about takeinventory() is not. :[

Share this post


Link to post
Epyo said:

Ok, so now the bex thing is working but that link to info about takeinventory() is not. :[


sorry, my cable is on the fritz (annoying as fuck, it is, but it's back up now, though for how long I dunno), but if you want a nice list of inventory yourself go into console and type 'logfile whatever.txt' and then 'dumpclasses inventory' (without quotes, natch), and there'll be a txt file in the same dir zdoom is in with a list of all the inventory

Share this post


Link to post

Wait up, now it tells me

Line 16: takeinventory(ammo, 50);
ammo : Identifier has not been declared


EDIT: DoomBoy figured that out for me, now I have a new problem

Zdoom crashes because of this line:

takeinventory(ammo, 49);

What's wrong?

Share this post


Link to post

inventory items are strings, so they need to be in quote. Also it's case sensetive, so for instance takeinventory("SuperShotgun", 1) will yeild different results from takeinventory("supershotgun", 1), so just follow the cases in the text file you dumped to.

Share this post


Link to post
DOOM Anomaly said:

Speaking of which, is it possible to have one of those message dee-lees pop up each time you kill a Hellspawn? I know it'd be annoying but its just a thought. :D

You could tag each monster in your map and have their death execute a hudmsg script. Dont know why you'd wanna do that though.

Share this post


Link to post

OK, last question I promise, is there anyway to change what gun the player is using?

Share this post


Link to post
Epyo said:

OK, last question I promise, is there anyway to change what gun the player is using?


yessir: setweapon("weaponname");

as with the previous functions, weaponname should be in quotes and is case sensitive

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
Sign in to follow this  
×