Page 2 of 2

Posted: Fri Mar 18, 2005 3:46 pm
by Grassy
Master-Of-Fungus-Foo-D wrote:crap it didnt work :evil:
heres the whole enchilada... heres the setthread....
airborne:
if (level.axishasspy != 3)
{
println "Be the otherteam... BE the other team :) "
local.lt = parm.other
if (local.pvt.dmteam == "axis" )
//should be local.lt.dmteam == axis ??
{
level.axishasspy++
setcvar "cg_3rd_person" "1" //debug
local.lt takeall
local.lt model "player/allied_airborne.tik"
local.lt item weapons/colt45.tik
local.lt item weapons/BAR.tik
local.lt ammo mg 60
local.lt ammo pistol 4
local.lt useweaponclass mg
while(level.axishasspy>0)
{
if (! isAlive local.lt )
{
setcvar "cg_3rd_person" "0"
level.axishasspy--
break
}
}
}
}
end[/code]

Posted: Fri Mar 18, 2005 4:06 pm
by Green Beret
yea,its kinda like counterdicting yourself

if you have local.lt = parm.other then it would have to be
if (local.lt.dmteam == "axis" ) where does the pvt
come from?
local.lt = parm.other
if (local.pvt.dmteam == "axis" )

Posted: Fri Mar 18, 2005 10:30 pm
by Master-Of-Fungus-Foo-D
oops,copy+past is where it came from..... seems as if i meissed something :oops:
sry for diging up your time... fixing :D

Posted: Fri Mar 18, 2005 11:09 pm
by Master-Of-Fungus-Foo-D
fixed that error, still when i kill myself, i dot get the axishasspy--.. its stays the same :(

Posted: Fri Mar 18, 2005 11:25 pm
by Grassy
Strange, try these small changes to got a better idea of what's happening.

Code: Select all

println "level.axishasspy = :" level.axishasspy

while(level.axishasspy>0) 
{ 
    if (! isAlive local.lt ) 
    { 
       setcvar "cg_3rd_person" "0" 
       level.axishasspy--
       println "[player died] level.axishasspy = :" level.axishasspy
       break 
    }
  wait 1  //you should have a small pause in a while loop 
} 

Posted: Fri Mar 18, 2005 11:58 pm
by Master-Of-Fungus-Foo-D
k.. thx... (stupid programming wont et me use waittill death and make life easy :evil: )

Posted: Sat Mar 19, 2005 2:26 am
by Master-Of-Fungus-Foo-D
oh MAN grassy youre the best ever :D !!!!!
IT worked! if i was over 21 id buy you a beer (if youre over 21 :P )... amybe a fine wine or liquor.... or maybe a cash prize is best!
THX... now, im off to face another dilemma:
trying to only allow the player to trigger it once :P

Posted: Sat Mar 19, 2005 7:18 am
by Grassy
Hehe, maye I'm WELL over 21 more than twice that actually :)

For the trigger once by the tagged player try this option:

Code: Select all

airborne: 
if (level.axishasspy != 3)
{ 
 println "Be the otherteam... BE the other team :) " 
 local.lt = parm.other
 
  if ((local.lt.dmteam == "axis") && (local.lt.istagged !=1)) 
  { 
   level.axishasspy++ 
   setcvar "cg_3rd_person" "1" //debug 
   local.lt takeall 
   local.lt model "player/allied_airborne.tik" 
   local.lt item weapons/colt45.tik 
   local.lt item weapons/BAR.tik 
   local.lt ammo mg 60 
   local.lt ammo pistol 4 
   local.lt useweaponclass mg
   local.lt.istagged = 1  //new variable to track tagged player
 
     while(level.axishasspy>0) 
     { 
       if (! isAlive local.lt ) 
       { 
         setcvar "cg_3rd_person" "0" 
         level.axishasspy-- 
         break 
       }
      wait 1 
     } 
  } 
} 
end