Ok here is my script, i want to no whats wrong, when i go in game, nothing appears. So i cant test it, i tried looking in the log file but noting appears there either.
end// <========= You need to end this thread here after you move up the stuff at the bottom
medbox:
local.medbox = spawn script_model
local.medbox model "items/item_100_healthbox.tik"
local.medbox.origin = ( 151.63 484.00 384.13 )
local.medbox.angles = ( 0 0 0 )
local.medbox.scale = 1.0
local.medbox light 1 0 100 0
local.medbox solid
local.medboxtrig = spawn trigger_use
local.medboxtrig targetname medbox
local.medboxtrig.origin = ( 151.63 484.00 384.13 )
local.medboxtrig setsize ( -20 -20 30 ) ( 30 30 80 )
local.medboxtrig message "You are now a medic (Hold E and Aim your laser on a person)"
local.medboxtrig setthread medic1
end// <========= You need to end this thread here setthread starts the medic1 thread
Medic1: self waittill trigger//<==== This thread is started by setthread this in not needed
local.player=parm.other
if (local.player.useheld == 1)
{// <==========You have a start bracket here where is the end bracket for it?
local.player.usinglaser = 1
local.medic1 setthread ent // <========== No local.medic1 defined
local.ent = spawn func_beam
local.ent.origin = local.medbox.origin // <========== No local.medbox defined in this thread use level.medbox in previous thread if you want to do this
local.ent minoffset 0.0
local.ent maxoffset 0.0
local.ent numsegments 1
local.ent life 0
local.ent color ( 0 0 100 )
local.ent alpha 0.4
local.ent alwaysdraw
local.ent activate // <========== func beam needs an endpoint
local.ent scale .5 local.ent setthread ent1 // <========== You can not use setthread with a func beam I don't think you need this line or the next 2 lines end ent1:
local.ent1 = spawn script_model
local.ent1 model "items/dm_50_healthbox.tik"
local.ent1origin = (trace local.entorigin (local.entorigin + 350 ))// <======= local.entorigin should be local.ent.origin I assume? also what is (local.entorigin + 350 ) ? + 350 on what axis x,y or z ? Where is this trace suppose to end ?
while (local.player.useheld) // <======= local.player is not defined in this thread if you end it above just before the ent1: line that I said was not needed
{// <==========You have a start bracket here where is the end bracket for it?
if (local.ent1 isTouching local.body.team)// <======= local.body is not defined in this thread and it's team value is not either but even if it was istouching is not right
{
local.body.team fullheal // <======= local.body is not defined in this thread
local.ent color (100 0 0) // <======= no local.ent in this thread if you end it above just before the ent1: line that I said was not needed
{
// <======= All this stuff should be at the top of the script before any threads are called ========
// Can specify different scoreboard messages for round based games here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw