Page 1 of 1
Flak88 and binocs
Posted: Fri Jul 08, 2005 2:06 pm
by MasterMind
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
Posted: Fri Jul 08, 2005 2:24 pm
by jv_map
Hmm maybe have a look @ Bjarne's scout mod

Posted: Fri Jul 08, 2005 2:35 pm
by MasterMind
i have already done that. TOOOO confusing

Posted: Fri Jul 08, 2005 2:57 pm
by jv_map
Well there is no
$flakk88 FireWhereeverILookAndClickWithTheBinoculars
command

Posted: Fri Jul 08, 2005 3:34 pm
by Elgan
i think you should use the search button;) i know there ahs been some things in the past on this. including a topic i made called something like "fire flak with radio" or soemthing. was a long time ago.
and isnt that also waht rookies fire for effect does?
Posted: Fri Jul 08, 2005 3:45 pm
by Rookie One.pl
No, my arty fires from nowhere.
It's not that hard. Just take the player's view forward vector, do a trace, aim the Flak and fire it.

Posted: Fri Jul 08, 2005 6:11 pm
by Elgan
Rookie One.pl {sfx} wrote:
It's not that hard. Just take the player's view forward vector, do a trace, aim the Flak and fire it.

can u imagine someone understanding that if they dont know how to do this already?
im pretty sure BdBodger had exacfly this is one of his maps.
Posted: Fri Jul 08, 2005 9:04 pm
by lizardkid
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
it's a hack and i dont know if the flakk even supports the turnto command but that's pretty much it, unless you want it to fire as well.
Posted: Fri Jul 08, 2005 10:27 pm
by Rookie One.pl
You're almost right, Lizard.
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
You might want to add an Z offset as the flak will turn straight to the point and it looks quite weird.
Posted: Fri Jul 08, 2005 10:29 pm
by Swordfish
I have another question about flak - how to made it functional?(For MP)
No just an object
Posted: Fri Jul 08, 2005 11:09 pm
by lizardkid
that would require a lot of other complex scripting, and i KNOW FOR SURE that there are other topics on that. do a search.
Posted: Fri Jul 08, 2005 11:31 pm
by Bjarne BZR
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. 
Posted: Sat Jul 09, 2005 6:53 am
by bdbodger
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 .