Code: Select all
//Vending machine that has out of order sign
script 464 (void)
{
ThrustThing (192, 16);
DamageThing (20);
delay(1);
DamageThing (20);
delay(1);
DamageThing (20);
delay(1);
DamageThing (20);
delay(1);
DamageThing (20);
delay(1);
DamageThing (20);
delay(1);
DamageThing (20);
delay(1);
DamageThing (20);
delay(1);
DamageThing (20);
delay(1);
DamageThing (20);
thingsound (23,"wep/rckt", 127);
Spawnspot ("SpawnedExplosion", 23, 0, 0);
ambientsound ("misc/chat", 127);
SetHUDSize (640, 480, 0);
hudmessage (s:"The sign told you not to touch.";
HUDMSG_PLAIN|HUDMSG_LOG, 1, CR_GOLD, 320.4, 340.0, 3.0);
}
The repeated use of "DamageThing (20);" in the script was merely an attempt to get around this (i.e. I thought a slow-kill rather than an instakill might help. It didn't.)
What I need is a script that will thrust the player away from the machine, kill them, create the associated effects (sounds and explosion actor), put up the message and have it remain on screen long enough for the player to see it and realise what has happened. So, basically I need some way of ensuring that the player has a chance to see the message before they then deliberately press [USE] to restart the map.
Anyone any ideas on how to do this cleanly?