Firing at func_tank from prisoner pod?

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
BloodShed
Vertex
Vertex
Posts: 13
Joined: Tue Sep 23, 2008 5:44 pm
Contact:

Firing at func_tank from prisoner pod?

Post by BloodShed »

Is there a way to make a bullet firing and/or rocket weapon (func_tank / func_tankrocket) fire from a prop_vehicle_prisoner_pod?
Image Image
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

I think its ok to parent func_tanks to things, I parented to physbox, just make sure the func_tank parents to the pod not the other way around.

You wnat the player to fire whilst in the pod, i thinkt he use func may eject you from pod rather than fire the func_tank :(
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

I had a version working in single player (option 2 see below), but once more than one player joined it b0rked up.

There's three ways to do it that I've found:

1) Use the "fire" input on the func_tank in combination with a game_ui that knows when the user presses the fire1 button. Activate the game_ui when the player enters the pod, and when the player presses fire1, just send a "fire" input to the func_tank. (Yes i know the fgd says there's no such input, but trust me, put it in there and a func_tankrocket will fire). BTW you also need an info_target for the gun to point at. Disadvantage: gun only points at one place.

2) Use an "enter vehicle" input on the func_tank. Player uses func_tank, enter vehicle is called on the pod, and the player is forced into the vehicle. Only major problem is that with more than one player, it chooses the first player who joined, and forces THEM to enter the vehicle (sometimes from across the map). Perhaps this bug could be fixed so that only the !activator is entered into the vehicle, but I think that's something for the coders. (It would certainly help!!)

3) Similar to (1), but instead of using a func_tank, just use env_bullets, a trigger hurt, or env_laser or somesuch. Same disadvantage as (1)

Hope that helps!
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
BloodShed
Vertex
Vertex
Posts: 13
Joined: Tue Sep 23, 2008 5:44 pm
Contact:

Post by BloodShed »

DaMaN wrote:I had a version working in single player (option 2 see below), but once more than one player joined it b0rked up.

There's three ways to do it that I've found:

1) Use the "fire" input on the func_tank in combination with a game_ui that knows when the user presses the fire1 button. Activate the game_ui when the player enters the pod, and when the player presses fire1, just send a "fire" input to the func_tank. (Yes i know the fgd says there's no such input, but trust me, put it in there and a func_tankrocket will fire). BTW you also need an info_target for the gun to point at. Disadvantage: gun only points at one place.

2) Use an "enter vehicle" input on the func_tank. Player uses func_tank, enter vehicle is called on the pod, and the player is forced into the vehicle. Only major problem is that with more than one player, it chooses the first player who joined, and forces THEM to enter the vehicle (sometimes from across the map). Perhaps this bug could be fixed so that only the !activator is entered into the vehicle, but I think that's something for the coders. (It would certainly help!!)

3) Similar to (1), but instead of using a func_tank, just use env_bullets, a trigger hurt, or env_laser or somesuch. Same disadvantage as (1)

Hope that helps!
1) Doesn't work, I tested it with "ent_message_draw 1" it does not make the func_tank or func_tankrocket fire.
and the part with info_target I assume it is set with the "settargetname" input for the func_tank.

2) I hope that gets fixed for the next version.

3) env_bullets does not exist.
The env_laser would mean I have to put a info_target at a long distance?
Image Image
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

BloodShed wrote:
DaMaN wrote:I had a version working in single player (option 2 see below), but once more than one player joined it b0rked up.

There's three ways to do it that I've found:

1) Use the "fire" input on the func_tank in combination with a game_ui that knows when the user presses the fire1 button. Activate the game_ui when the player enters the pod, and when the player presses fire1, just send a "fire" input to the func_tank. (Yes i know the fgd says there's no such input, but trust me, put it in there and a func_tankrocket will fire). BTW you also need an info_target for the gun to point at. Disadvantage: gun only points at one place.

2) Use an "enter vehicle" input on the func_tank. Player uses func_tank, enter vehicle is called on the pod, and the player is forced into the vehicle. Only major problem is that with more than one player, it chooses the first player who joined, and forces THEM to enter the vehicle (sometimes from across the map). Perhaps this bug could be fixed so that only the !activator is entered into the vehicle, but I think that's something for the coders. (It would certainly help!!)

3) Similar to (1), but instead of using a func_tank, just use env_bullets, a trigger hurt, or env_laser or somesuch. Same disadvantage as (1)

Hope that helps!
1) Doesn't work, I tested it with "ent_message_draw 1" it does not make the func_tank or func_tankrocket fire.
and the part with info_target I assume it is set with the "settargetname" input for the func_tank.

2) I hope that gets fixed for the next version.

3) env_bullets does not exist.
The env_laser would mean I have to put a info_target at a long distance?
1) Did you have it pointing at an info_target? It was a SetTargetEntity input or something. And the "Fire" input wasn't a certified input, but it seemed to work anyways. I'll run a test on it tonight.

2) Me too.

3) I meant env_gunfire with a trigger_hurt. Didn't have the chance to look it up. Work with me here. http://www.hl2world.com/wiki/index.php/Env_gunfire
And yes, you'd need an info_target a long ways away with an env_laser, parented to whatever you're using.
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
BloodShed
Vertex
Vertex
Posts: 13
Joined: Tue Sep 23, 2008 5:44 pm
Contact:

Post by BloodShed »

I found a solution. (^_^)


place a info_target in front of the barrel and parent it to the func_tank or func_tankrocket.
use the pitch yaw roll to face the func_tank in the direction you want it to face in the compiled map.

When the player activates the game_Ui use the "PlayerOn" output to send the following to the turret.

Code: Select all

input: SetTargetEntityName
Parameter: name_of_info_target

To make it shoot set the following output in the game_ui

Code: Select all

Output: PressedAttack

Target: name_of_func_tank
input: Activate
You will also need this

Code: Select all

Output: UnpressedAttack

Target: name_of_func_tank
input: Deactivate
Thats all there is to it ^_^

Of course I expanded it to a functional turret.

Image
Image Image
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Impressive.

You obviously know what your doing, any chance a future project coming our way?
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
BloodShed
Vertex
Vertex
Posts: 13
Joined: Tue Sep 23, 2008 5:44 pm
Contact:

Post by BloodShed »

fug4life wrote:Impressive.

You obviously know what your doing, any chance a future project coming our way?
I already have a couple in the design phase (sketching, story, prototyping etc.).
Image Image
DaMaN
npc_combinegunship
npc_combinegunship
Posts: 782
Joined: Tue Nov 07, 2006 12:03 am
Location: Parent's Basement
Contact:

Post by DaMaN »

Nice! Well done. :D

I've been toying around with this idea for a couple of years, and I've been meaning to get a co-op map built with things like this in it.

Glad to see you've also figured out a way to make it work. :)
Current projects: Return to City 17 and Rising Dead
Also, check out my Blag: http://daman-amappersworld.blogspot.com/
fug4life
Beta Tester
Beta Tester
Posts: 4093
Joined: Mon Dec 11, 2006 10:35 am

Post by fug4life »

Here's a failed attempt to get what was someone else's stationary func_tank flame thrower (fpsb I think).

Image

I tried to implement into a re-feuling station.

Any how I was try to make a petrol pump nozzle ignite at a near by a fire to become a flamethrower but it was going to be on a move rope so if you went more than 5 meters from centre of gas station you'd drop it.

btw picture is from last years halloween attempt. It's basically a zombie fest in a car breakers yard. It was a part project for PowerMad and others.

But the problem I had is what you've just solved, as I couldn't pick up the func_physbox and fire the flame thrower. It's nice to know its possible.
'I would probably smarten up before you meet Violet'.
'She has zero tolerance for idiots'.

fug's Obsidian files
fug's Obsidian clips
Obsidian wiki
Obsidian Map Database
Post Reply