hi guys a little question if i may do it
Im trying to make a script for healing the player.
When for exc. you walk in a mp game and you got less health like 12%
is it possible by makeing a script and bind a key to it to receive some health for the player?
health?
Moderator: Moderators
- XenoPHoXx_NL
- Sergeant
- Posts: 53
- Joined: Thu Feb 16, 2006 11:26 pm
- Contact:
health?
Can't Win The Game? Change The Rules!
trigger
Well, it would be easier to just create a trigger. The player would only have to walk up to a health station and touch something or press his "use" key to be healed. Below is a thread I used in the map named Murders_row.

The "static/gold_v2.tik" model is a gold textured rocket I created. If you want to use it, it is in the Murders_row pk3, and it is also used in the map named test_pointer.

Code: Select all
gold_rocket:
local.rocket = spawn script_model model "static/gold_v2.tik"
local.rocket.origin = ( 736 544 80 )
local.rocket.scale = .2
local.rocket notsolid
local.rocketclip = spawn script_object
local.rocketclip.origin = local.rocket.origin
local.rocketclip setsize ( -16 -16 0 ) ( 16 16 128 )
local.rocketclip solid
local.rc = spawn script_model model "static/corona_orange.tik"
local.rc.origin = ( 736 544 235 )
local.rc.scale = .6
local.rocket_trigger = spawn trigger_multiple targetname "health_trigger"
local.rocket_trigger.origin = local.rocket.origin
local.rocket_trigger setsize ( -18 -18 0 ) ( 18 18 128 )
health_giver:
$health_trigger waittill trigger
local.player = parm.other
if ((isalive local.player) && (local.player.health < 100))
{
local.player heal 1
local.player playsound med_kit
local.player exec global/message_print.scr::message "Health restored!" NIL 4
}
wait 4
goto health_giver
end
Last edited by tltrude on Sat Mar 04, 2006 11:29 am, edited 4 times in total.
- XenoPHoXx_NL
- Sergeant
- Posts: 53
- Joined: Thu Feb 16, 2006 11:26 pm
- Contact:
