Posted: Mon Dec 27, 2004 9:28 pm
set the spanw flags for the trigger to 128Green Beret wrote:isnt there a way to activate a trigger using a gun.
as in shooting it to trigger it?
128 ( trigger no projectile)
144 ( trigger inc projectile)
set the spanw flags for the trigger to 128Green Beret wrote:isnt there a way to activate a trigger using a gun.
as in shooting it to trigger it?
Code: Select all
mgShootAtHim:
$mg aimat $victim
wait 1
$mg shootat $victim
wait 1
$mg aimat NULL
Code: Select all
mg_ops:
$gunner waittill trigger
$mg aimat $player
wait .5 //I like fast results ;-)
$mg shootat $player
wait .5 //I like fast results ;-)
$mg aimat NULL
goto mg_ops
endCode: Select all
mg_ops:
while(1) {
$gunner waittill trigger
$mg aimat $player
waitframe //now that's real fast!
$mg shootat $player
waitframe //hurry up!
$mg aimat NULL
}
endCode: Select all
mg_ops:
while(1) {
$gunner waittill trigger
local.player = parm.other
$mg setaimtarget local.player
$mg waittill ontarget
$mg startfiring
While(local.player istouching $gunner)
{
$mg setaimtarget local.player
waitframe
}
$mg stopfiring
}
end jv_map@mods-r-us.net wrote:you can do something like:P.S. don't do this every frame, it will cause tremendous lag (with a delay of say 0.5 I think there won't be a problem).Code: Select all
$player[local.number] weaponcommand dual targetname ("playerweap" + local.number) // sets targetname of weapon player is holding // then: switch($("playerweap" + local.number).model) { case "models/weapons/m1_garand.tik": // blablabla break // etc }