Flak88 and binocs

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Flak88 and binocs

Post 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
Jesus built us a bridge, with 2 boards and 3 nails.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Hmm maybe have a look @ Bjarne's scout mod :wink:
Image
User avatar
MasterMind
Major
Posts: 316
Joined: Thu Jul 15, 2004 12:10 am

Post by MasterMind »

i have already done that. TOOOO confusing :?
Jesus built us a bridge, with 2 boards and 3 nails.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Well there is no

$flakk88 FireWhereeverILookAndClickWithTheBinoculars

command :(
Image
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post 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?
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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. ;)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Elgan
Lieutenant General
Posts: 890
Joined: Tue Apr 13, 2004 10:43 pm
Location: uk
Contact:

Post 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.
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
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:

Post 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.
Last edited by Rookie One.pl on Sat Jul 09, 2005 8:58 am, edited 1 time in total.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Swordfish
Lance Corporal
Posts: 19
Joined: Wed Jun 29, 2005 7:14 pm

Post by Swordfish »

I have another question about flak - how to made it functional?(For MP)
No just an object
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post 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. :)
Admin .MAP Forums
Image
Head above heels.
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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 .
Image
Post Reply