That seems like a hybrid trigger_multiple and trigger_use. You could add both triggers at one origin, disabling the "multiple" whenever "use" is triggered. But an easier way is to check for "local.player.useheld" in a trigger_multiple's setthread. Try this example below:
Code:
test:
local.trig = spawn trigger_multiple
local.trig.model = "models/weapons/kar98sniper.tik"
local.trig.origin = ( 0 0 100 )
local.trig.angles = ( 180 0 90 )
local.trig setsize ( -30 -30 -5 ) ( 30 30 30 )
local.trig.scale = 1
local.trig light 1 0 0 65
local.trig show
local.trig setthread pickup
end
pickup:
self nottriggerable
local.player = parm.other
if(local.player.useheld == 1)
{
//local.player iprint ("Picked up a sniper.")
self message ("*** Picked up a sniper. ***")
local.player give "models/weapons/kar98sniper.tik"
local.player stufftext "useweaponclass rifle"
local.player playsound kar98_snd_pickup_ammo
self hide
wait 3
self triggerable
self message ("")
self show
end
}
wait 1
local.player iprint ("Hold USE to pick up a sniper.")
//self message ("*** Hold USE to pick up a sniper. ***")
self triggerable
end