The Blapperture Multi-Tool Framework

Avatar
FelixGriffin
2,680 Posts
Posted Aug 24, 2013
Hello everyone,

As you may have seen on my recent Hammer Notepad videos, I've been working on a framework that will allow players to have multiple weapons and switch between them as in HL2. It works pretty well (although it requires a keybinding for the switch command), and so far it has three parts: a portal gun, a gravity/gauss/AR2/gluon gun combination, and a paint sprayer.

I've seen that some other people have made custom weapons for their maps or mods, and it would be cool to include them all in one package. A map made with the package doesn't need to include all of them: the player needs to pick up "ammo cartridges" that enable the various functions. If you don't want to have the player spray Conversion Gel everywhere, don't put a Conversion Gel cartridge in the map. If you don't want energy balls flying everywhere, leave out the AR2 cartridge.

Right now I'm working on making the script easier to use, so that players won't have trouble switching weapons. But if anyone has a custom weapon that they'd like to be included, just post here.

Advertisement
Registered users don’t see ads! Register now!
Avatar
Flo2912
80 Posts
Posted Aug 24, 2013
Replied 1 hour later
Yeah, that sound's cool. You already know, I was working on a Paint-Gun, too. I don't know how far your's is, but mine is already useable, you spray Gel with the left mousebutton and change the type with the right button. It works pretty well i just wasn't able to figure out how to change to portals at the momennt (I can't script since i haven't learnd it now... :sad: ) The thing with the ammo cartridges, is exactly that what I wanted to try next, so... seems like your doing the same as I was trying xD
How functional is your Paintgun at the momennt? I can give you my work if you want, but I think your is alredy finished, or at least startet. (Don'T know if my system would work with yours anyway)

I'm looking forward to this, I hope you can release it soon :smile:

Avatar
FelixGriffin
2,680 Posts
Posted Aug 24, 2013
Replied 31 minutes later
Funny, I was actually using the exact same method. I haven't finished yet, so if you have a partially-working implementation I'd love to see it. :smile:
Avatar
Flo2912
80 Posts
Posted Aug 24, 2013
Replied 1 hour later
My one is based on the "Bluemod" for pti, i switched some things and added other, so that it works. (there are some little things I don't exactly know what they do in Bluemod, so I ignored them completly, didn't even remove them^^)

here is how it works:
basicly it is a portalgun where the options for shooting portals had been turned off. there is a paintsprayer parented with the player, with has basicgeltype water. And then there is a game_ui (oh, really ? :biggrin:), actually turned on by a trigger (that was in the original bluemod, it wanted to change it so that the portal activats it on pickup) that checks the mousebutton presses and gives out Gel on lefklick and on rightclick it gives outputs to a bunch of Math_counters I've added. every counter starts at another number, they all have the same min and the same max number, every rightclik subtracs 1 of every counter, if a counter reaches 0 it changes the gletype of the spayer, triggers a textmessage that tells the player the Gel-Type and set itself back to the highest number^^
I don't know how to get it work along with the ammo cartridges at the momennt, because I've only theoretically thought about it, but didn't start with it right now.

I've added the instance for you, to see and test around, and also a bsp for seeing how it works ingame (ignore the button there, this is a forgotten part of one of my tries to get portals working :biggrin:)

Conversiongel was removed from the gun, because it makes now sense as long as you cant shoot portals :wink:

Attachments
paint_gun_flo.vmf
0.02 MB 35 downloads
paintgungedoenstest.bsp
0.19 MB 39 downloads
Avatar
FelixGriffin
2,680 Posts
Posted Aug 24, 2013
Replied 1 hour later
Cool, I'll try it out.
Avatar
Gemarakup
1,183 Posts
Posted Aug 24, 2013
Replied 3 hours later
What about weapon_paintgun?
Avatar
CamBen
973 Posts
Posted Aug 24, 2013
Replied 3 minutes later

yishbarr wrote:
What about weapon_paintgun?

Nonfunctional entity, sadly.

Avatar
Flo2912
80 Posts
Posted Aug 25, 2013
Replied 56 minutes later

CamBen wrote:
yishbarr wrote:

What about weapon_paintgun?

Nonfunctional entity, sadly.

Yep. it isn't even visable in the game, same with item_pickup_paintpower. I've tried a lot to get it work, but I never even swa one of this things shown up in the map, no talking about the ability to use it :sad:

Avatar
FelixGriffin
2,680 Posts
Posted Aug 25, 2013
Replied 7 hours later
Try ent_creating it with developer mode on, it'll give you errors about creating a nonexistant entity.

With Motanum's help I got everything to be much more stable now, motion is really smooth and the func_tank can never be dropped.

Flo, I don't quite understand the thing with the different counters. It's a clever idea, but why not just use one counter and a logic_case?

Avatar
Flo2912
80 Posts
Posted Aug 25, 2013
Replied 2 hours later
Bceause than the counter has to give out an output to the logic case on every value, but I don't kno how to make it that it gives out different outputs depending on wich value it has at the momennt, so I used multible counter that give a direct command to the paintsprayer. was easyer to do for me :wink:
Avatar
CamBen
973 Posts
Posted Aug 25, 2013
Replied 1 hour later

FelixGriffin wrote:
With Motanum's help I got everything to be much more stable now, motion is really smooth and the func_tank can never be dropped.

:surprised: You've got me interested. This would be very useful for my gravity gun, if you care to share how. i've already made the player never be able to get into the control volume again, but it can still be deactivated.

Avatar
FelixGriffin
2,680 Posts
Posted Aug 25, 2013
Replied 1 hour later

Flo2912 wrote:
Bceause than the counter has to give out an output to the logic case on every value, but I don't kno how to make it that it gives out different outputs depending on wich value it has at the momennt, so I used multible counter that give a direct command to the paintsprayer. was easyer to do for me :wink:

Just connect the OutValue of a math_counter to the InValue of a logic_case and it'll give you a different output for each number you want to watch. :wink:

CamBen wrote:
FelixGriffin wrote:

With Motanum's help I got everything to be much more stable now, motion is really smooth and the func_tank can never be dropped.

:surprised: You've got me interested. This would be very useful for my gravity gun, if you care to share how. i've already made the player never be able to get into the control volume again, but it can still be deactivated.

It's a very cool idea. If you use a logic_measure_movement to measure the Eye Position of the !player, and give both the weapon and the player the same measurement reference, it will follow the eye position exactly.

The one problem I have right now is that the viewmodel doesn't move smoothly, it sort of jitters. Can you think of a way to smooth that out a bit?

Avatar
CamBen
973 Posts
Posted Aug 25, 2013
Replied 5 hours later
Awesome! then the collision glitch on my gravity gun will be resolved. As for the jittery movement, maybe make a non controllable tank with a slow speed and very limited range to follow an info_target parented to the player's forward attachment. I'm far from being an expert on logic_measure_movements and this type of thing, but that may level out the movement a bit, I'm not sure. I hope something works out, though.

Also, are you planning to implement a machine gun function into the Blaperture tool? I know it wouldn't really have much of a point, except in coop competition maps, but anyway, just curious.

Avatar
FelixGriffin
2,680 Posts
Posted Aug 25, 2013
Replied 1 hour later
Possibly. How would something like that work? A laser with a damage setting for hitscan, or projectiles?
Avatar
CamBen
973 Posts
Posted Aug 26, 2013
Replied 13 hours later
For my AR2 in portal 2, I parented a turret with draw and collisions disabled, used as actor, and gagged, to the gun, then used a logic timer to retire the firebullet target output.
Avatar
FelixGriffin
2,680 Posts
Posted Aug 26, 2013
Replied 7 hours later

CamBen wrote:
For my AR2 in portal 2, I parented a turret with draw and collisions disabled, used as actor, and gagged, to the gun, then used a logic timer to retire the firebullet target output.

Wow. That sounds interesting. How well does it work?

Avatar
CamBen
973 Posts
Posted Aug 26, 2013
Replied 4 minutes later
Works very well, except that there was an annoying red laser that did not aim properly. That could probably be fixed by putting a brush in front of the turret's eye.
Avatar
FelixGriffin
2,680 Posts
Posted Aug 26, 2013
Replied 1 minute later
And I'm sure there are other ways to disable the laser. I might try that.
Avatar
Flo2912
80 Posts
Posted Aug 27, 2013
Replied 9 hours later
So... Is my Paintgun usefull for the project, or will you make it completly new?
Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Aug 27, 2013
Replied 4 hours later
I'm not using any of the code directly, but it helped me figure some parts out.