Playerspecific scripting, pain, local wm_announce ?


(Erik-Ftn) #1

1. “pain” in scripting

Hi

Some time ago I discovered “pain” in scripting. The Gscript event (from g_scriptdebug) that is sent also contains the “before/after”- hp values of the attack, like this:

pain -8 10 (a func_explosive with 10 hp was shot, lost 18 hp and is now gone)

my question is:

Are these values stored in some standard registers somewhere? Can they be imported into a script for accum storage or some in-script conditions?

2. Playerspecific scripting

When I’m shot, killed or spawns, scripting events occurs. (pain/ death /playerstart)

Is there a (standard?) routine for these standard functions?

3. wm_announce

When I pick up ammo or health I get a textmessage that only I see. I guess this is ultimately from the echo command with some parameters set and that wm_announce does the same with some other parameters.

Are there parameters I can set in wm_announce to make a message private? Are there alternative versions of wm_announce?

Can I call console commands or maybe a .cfg file from scripting ?

4. “Print” scripting command

What parameters does this scripting command have? Does it do anything else than sending text to console?

:slight_smile:

thx

Erik


(GRouZER) #2

edit: kicking up the topic


(Erik-Ftn) #3

:???:


(MadMaximus) #4

ok… i have to ask… what specificly are your looking for? if you are damaged in game, then in-game handles your hurt… if you make a trigger-hurt, then you can set the specifics for that entity without scripting… what is it your looking for?


(Erik-Ftn) #5

ah,… eg

when a script_mover is hurt/ killed, standard scriptfunctions are called: pain, death

when a player spawns, is hurt/ killed some other standard scriptfunctions are called, though there seems not to be a scripting routine for them… (ie the scriptname of a script_mover)

if there was a scriptroutine for the player you could script events to occur when a player is hit by a bullet or killed…