Sign in to follow this  
Followers 0

2 scripting questions

1) how do I instantly kill the player, for example on NJTRAIN.wad when you step off the train, you die instantly...

2) is there a way to change ceiling/floor textures through scripting?

thanks all...

Share this post


Link to post

There are a few ways to kill the player pronto. One is to set the sector damage very high, I think 255 is the max value, and when the player touches that floor, splat. You can also use the script damagething and trigger it in a number of ways.

Changing flats, I keep thinking I heard something about it but can't find it now when I search.

Share this post


Link to post

Most of this is from the Zdoom manual (downloadable from the zdoom page).

Sector_SetDamage (tag, amount, mod)

tag = Tag of affected sector
amount = amount of damage to applay
mod = Means-of-death identifier

Sets the amount of damage done to a player in a sector. This is in addition to whatever is specified by the sector's special. Damage amount below 20 will only hurt the player if he doesn't have an environment suit. Damages between 20-49 will occasionally hurt the player even with an environment suit on. Damages of 50 and above will always hurt the player unless he is in god mode.

The following means-of-death identifiers are suitable for use with the Sector_SetDamage special:

0 MOD_UNKNOWN
12 MOD_WATER
13 MOD_SLIME
14 MOD_LAVA
15 MOD_CRUSH
16 MOD_TELEFRAG
17 MOD_FALLING
18 MOD_SUICIDE
19 MOD_BARREL
20 MOD_EXIT
21 MOD_SPLASH
22 MOD_HIT


From Enjay Train

Sector_SetDamage (const:2, 1000, 7);

OK, so 1000 is possibly extreme. I *think* it is something like 400 and over will always kill you, even in god mode.

Changing flats, nice and easy:

ChangeFloor(tag, "FLAT")

eg ChangeFloor(1, "RROCK03");

changeceiling(tag, "FLAT");

eg changeceiling(2, "RROCK03");


Share this post


Link to post

Hi N. I did a search in zdoom forums for "change flats" and came up with nothing. Odd.

Share this post


Link to post

I think I first found it in Tarin's acsstuff.wad, and just copied and pasted it. When I went looking, I couldn't find it in the regular Zdoom stuff, but it was in HexSpecs.doc (Hexen Specifications)which either came with, or you were advised to get with the Zdoom editing stuff.

Share this post


Link to post

Both ChangeCeiling and ChangeFloor are in the Internal Functions on the ZDoom editing reference page.
As for Sector_SetDamage, you can also set it's damage to 0 to instantly kill the player no matter how many health he's got. Just adding it for completion ;)

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0