Flak88 and binocs
Moderator: Moderators
- MasterMind
- Major
- Posts: 316
- Joined: Thu Jul 15, 2004 12:10 am
Flak88 and binocs
Is there any way i could get a flak88 to fire where ever i look and click with the binoculars? Also could i make it so that you can only do this if your location is right next to the flak88?
thx
thx
Jesus built us a bridge, with 2 boards and 3 nails.
- MasterMind
- Major
- Posts: 316
- Joined: Thu Jul 15, 2004 12:10 am
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
Code: Select all
local.player = $player
local.range = 1024
local.fwd_vec = angles_toforward local.player.viewangles
local.start = local.player gettagposition "Bip01 Head"
local.range = 10240
local.ground = trace (local.start + local.fwd_vec * 64) (local.start + local.fwd_vec * local.range ) 0
$flakk turnto local.ground
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
-
Rookie One.pl
- Site Admin
- Posts: 2752
- Joined: Fri Jan 31, 2003 7:49 pm
- Location: Nowa Wies Tworoska, Poland
- Contact:
You're almost right, Lizard.
You might want to add an Z offset as the flak will turn straight to the point and it looks quite weird.
Code: Select all
local.player = $player
local.fwd_vec = angles_toforward local.player.viewangles
local.start = local.player gettagposition "Bip01 Head"
local.range = 10240
local.ground = trace (local.start + local.fwd_vec * 64) (local.start + local.fwd_vec * local.range ) 0
$flak setaimtarget local.ground
Last edited by Rookie One.pl on Sat Jul 09, 2005 8:58 am, edited 1 time in total.
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:
Its all done in the "binocular_fire" method.
For your location dependency you need a trigger_multiple, add a scanner that scans all players to see if they are touching the trigger, and then only allow players marked as beeing in the trigger to fire the flak.
Fireing the flak is in the Dogville map, where I re-scripted snowy park to an obj map. I also have a specific "Fire flak" tutorial.
Scanners are in the scout mod and in The Canal liberation mode map.
That should help. If not: its back to scripting school for you.
For your location dependency you need a trigger_multiple, add a scanner that scans all players to see if they are touching the trigger, and then only allow players marked as beeing in the trigger to fire the flak.
Fireing the flak is in the Dogville map, where I re-scripted snowy park to an obj map. I also have a specific "Fire flak" tutorial.
Scanners are in the scout mod and in The Canal liberation mode map.
That should help. If not: its back to scripting school for you.
I used a slightly modified version of Bjarne BZR's scout mod that lights up a player with the binoculars in my map the rescue to fire the flak when you where standing in the tower in front of the building next to the flak . On my site is the flakfire.scr a script that fires the flak where you aim when you stand beside it and use the use key .




