Bomb Launching

Avatar
TripleG10
107 Posts
Posted Jan 09, 2012
Hey guys! I've searched the web for this, but can't seem to find any information. Maybe because of the difficulty or knowledge of coding and modeling that is required.
You all know the bombs Wheatley launches at the end of the game, right? Well I am looking for something similar to that.
I'm not asking for models though. Just how to launch the bombs in the player's direction. If the following is possible using the same or similar techniques, I would like for a laser light to follow the player.

Thanks!

PS: It's late over here, so I will probably not respond until tomorrow.

Advertisement
Registered users don’t see ads! Register now!
Avatar
spongylover123
944 Posts
Posted Jan 10, 2012
Replied 27 minutes later
Use the entity prop_exploding_futbol.
Change the model to a bomb.
Avatar
Spam Nugget
492 Posts
Posted Jan 10, 2012
Replied 7 hours later
For a laser light, use a env_laser and change the entity to point at to !player, i think that works.
Avatar
TripleG10
107 Posts
Posted Jan 10, 2012
Replied 8 hours later
Thanks! The bombs do explode, but there's still the issue of getting the bombs to launch at the the player. By the way, I don't believe that you even need to change the model. Rendered in game, it looks just like a bomb while in Hammer, it's a blue sphere thing.

EDIT: I just tested the laser idea out, and it works great! My only request is that I wanted the laser to lag behind the players running slightly, so the player can get away. (I don't mean like server lag, I mean I want the laser to move a little slower than the player.)

Avatar
Vordwann
767 Posts
Posted Jan 10, 2012
Replied 42 minutes later
you could parent a non-solid func_brush to the player that is slightly behind them (however much you want) and make it point at that instead.
Avatar
TripleG10
107 Posts
Posted Jan 10, 2012
Replied 1 hour later
Hmm... possible, but dosen't that mean that if the player were to stop running altogether, the laser would stop just near the player? I have just slowing the laser in mind, so if there was a way to that, that would be great because that is the exact effect I'm looking for.

I've been experimenting with the bombs, but I can't find a way to launch them. Spawning them, (say from a box dropper) is possible, so maybe something utilizing that technique might be possible?

Avatar
Soundlogic
169 Posts
Posted Jan 10, 2012
Replied 2 hours later
Spawn them, then put them in a trigger catapult. Make your launch target the same thing that you use to track the player. This will then catapult them to that point.
Avatar
TripleG10
107 Posts
Posted Jan 11, 2012
Replied 20 hours later
:biggrin: Thank you! This has to work! I can't believe I didn't think of this. Probably because I thought that they would detonate upon hitting the faith plate... Thanks!

EDIT: Rather than making a whole new thread, let's just stay here. I still need to know if there is a way to slow the laser slightly.

Avatar
Soundlogic
169 Posts
Posted Jan 11, 2012
Replied 19 minutes later
You don't need a faith plate, just the trigger catapult.
Also, if you want the laser to be at the location the player was at n steps ago, I could write you a script
Avatar
TripleG10
107 Posts
Posted Jan 11, 2012
Replied 3 hours later
Thanks, but again, if the player were to stop running, wouldn't the laser stop one step behind the player? I could be wrong, so correct me if I am. I hadn't considered this next idea though. Is there any option to slow the laser's speed in the properties? I haven't been near my laptop, so I haven't had time to check.

EDIT: I JUST HAD A GREAT IDEA! Whoever said he could write the script for me, this might work. Is there a way to make it so that apon reaching say, 1 step behind the player, the laser's target then switches to the player? And once the player is back in motion, it would automaticly revert to the one step rule? Please tell me if this is possible!

Avatar
Soundlogic
169 Posts
Posted Jan 11, 2012
Replied 27 minutes later
I meant n game steps, a duration, not a distance. So the laser would point at where you were n seconds ago... Or I could have it move twords the player at a rate determined by a rule of your choosing.
Avatar
TripleG10
107 Posts
Posted Jan 12, 2012
Replied 18 hours later
Are the seconds realistic? Because in some games, one second is very short... let's try one second. How would I obtain this script from you?

EDIT: I just tried the bomb spawning, and that works, all except for two things. One, even though I changed the bomb's model to the actual bomb instead of the glass futbol, it still looks like the glass futbol. And two, they don't seem to work correctly with the trigger_catapult. The bomb falls onto it, then just spazzes out and explodes. It doesn't seem to be flung at all.

Avatar
Vordwann
767 Posts
Posted Jan 12, 2012
Replied 3 hours later
what flags are checked in the trigger_catapult?
Avatar
TripleG10
107 Posts
Posted Jan 12, 2012
Replied 2 minutes later
Almost everything, except for anything to do with clients or vehicles, since I don't want the player to be able to fling. What am doing wrong?
Avatar
ChickenMobile
2,460 Posts
Posted Jan 12, 2012
Replied 51 minutes later
I would have parented your bomb launcher to a func_tank which tracks the player. I remember in sp_a2_core they use one to track the player so glados can put up panels to stop the player from pressing the stalemate button.

img

Avatar
TripleG10
107 Posts
Posted Jan 12, 2012
Replied 22 minutes later
And how would one go about doing that? I have zero experience with tracktrains and all that stuff...
Avatar
ChickenMobile
2,460 Posts
Posted Jan 12, 2012
Replied 13 minutes later

TripleG10 wrote:
And how would one go about doing that? I have zero experience with tracktrains and all that stuff...

I have given you an example with a picture of where it is. Decompile sp_a2_core and find it. Also no tracktrains needed.

Avatar
TripleG10
107 Posts
Posted Jan 13, 2012
Replied 18 hours later
O.O Wow... I decompiled it and I understand none of what the tank thing does... Could I even utilize that strategy to get what I'm going for? I guess I'll keep trying... By the way, would Soundlogic post some kind of link in order to download his script, or would it somehow be sent to me? Either way is fine.

EDIT: I just noticed something! I was testing around to see if the trigger_catapult even works. I set the launch target to my testchamber door, and the shards of exploded bomb seem to fly towards the testchaber door, rather than the bomb before it explodes... This leads me to believe that maybe something is up with the !player target command?

Avatar
TripleG10
107 Posts
Posted Jan 13, 2012
Replied 17 minutes later
WOWWWWWW I THINK I JUST SOLVED MY PROBLEM!!!!! I've been accidently using the prop_glass_futbol when I'm supposed to be using prop_exploding_futbol! Ok well now that that's solved, all I have to do is wait for that custom script for my laser.

EDIT: Sorry guys... there's still a problem... the bomb spawns, looks, and explodes fine, but the trigger catapult just launches them in one direction. It doesn't even launch towards me.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Rand0mNumbers
76 Posts
Posted Jan 13, 2012
Replied 2 hours later
Here is how to use func_tank (around 2:30):
33vdbgIKvcQ

Just play with the speed and rate values to get what you want.