Damage Text?

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Franaticus Satanii
Colour Sergeant
Posts: 84
Joined: Tue Aug 19, 2003 5:38 pm
Location: Florida, USA

Damage Text?

Post by Franaticus Satanii »

Hello, I'm not sure even how to describe this to search for it...so I will try a post.

After a person dies it says you were shot in the head....or tripped over a grenade...etc.

I would like to add some custom text to my map for when a character is receiving damage when tied to a trigger script. For example: if they walk into a gas chamber it says..."You are choaking to death" or some other phrase.

Anyone understand what I am attempting to describe? Anyone know how to add/modify these responses?

Thanks for any insight.
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

I think this is what you are fishing for:

Code: Select all

axis_chicken_punishment:

	if ( parm.other.dmteam == axis ) {
		parm.other hurt 10 "BULLET"
		if (randomint(4) == 0) {
			parm.other iprint "Get back in there kraut!" 1
		}
	}

end
There are a number of predefined types other than "BULLET" ( anyone else know where the types can be found? ).
Admin .MAP Forums
Image
Head above heels.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

All means of death are listed in global/bullethit.scr:

// Means of death values:
// 0 MOD_NONE,
// 1 MOD_SUICIDE,
// 2 MOD_CRUSH,
// 3 MOD_CRUSH_EVERY_FRAME,
// 4 MOD_TELEFRAG,
// 5 MOD_LAVA,
// 6 MOD_SLIME,
// 7 MOD_FALLING,
// 8 MOD_LAST_SELF_INFLICTED,
// 9 MOD_EXPLOSION,
// 10 MOD_EXPLODEWALL,
// 11 MOD_ELECTRIC,
// 12 MOD_ELECTRICWATER,
// 13 MOD_THROWNOBJECT,
// 14 MOD_BEAM,
// 15 MOD_ROCKET,
// 16 MOD_IMPACT,
// 17 MOD_BULLET,
// 18 MOD_FAST_BULLET,
// 19 MOD_VEHICLE,
// 20 MOD_FIRE,
// 21 MOD_FLASHBANG,
// 22 MOD_ON_FIRE,
// 23 MOD_GIB,
// 24 MOD_IMPALE,
// 25 MOD_BASH,
// 26 MOD_TOTAL_NUMBER

Simply remove the prefix MOD_ and you should be fine ;), possibly the number will work too.
Image
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

I've had trouble getting those values to work... but it was a long time ago, I may have done something else wrong that time ;)
Admin .MAP Forums
Image
Head above heels.
Franaticus Satanii
Colour Sergeant
Posts: 84
Joined: Tue Aug 19, 2003 5:38 pm
Location: Florida, USA

Post by Franaticus Satanii »

I would assume so...

If a player gets shot and dies....the yellow text on the top says "so-and-so player was shot in the head".

I want to customize it to be if a person gets gassed it responds with "so-and-so player was suffocated by zyklon-b gas" or something to that effect.

While I can do 1/100000000000 amount of scripting, I would like to know if anyone has done this and how the trigger was tied to the script, how the script read, and how to place the response associated with the type of damage. Sounds like a long laundry list...but I'm sure some industious scripters/mappers have come up with a solution.

I know there are stock responses...but I dont know where they are.

Bjarne...do you have the time to break down the little bit of code you supplied. I can read the target name is axis_chicken...then you add an if axis parameter...then I get lost. Can you clarify so I can learn a little more about the scripting interactions?
Murphy's Law:
It is impossible to make anything foolproof because fools are so ingenious.
Post Reply