Advanced Question: Custom Items

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
I've heard it's possible to create a new medpack (or custom item) which could essentially heal you over 100%, a lot like the medics healing beam when the ally is at 100% health.

Say you have 100 life and get this new medkit/custom item, it'll set your life to 110. Does anyone know how to go about doing this? I've seen it done on certain maps with an Ubercharge but am not entirely sure how it works.
 

Dr. ROCKZO

L8: Fancy Shmancy Member
Jul 25, 2009
580
159
Possibly programmable with Sourcemod, I'm not too sure how much you could do through Hammer and its associates.

*Blows the Experienced Mappers Summoning Horn*
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
Its impossible unless you're running your own server, then it will ONLY work on that server.
It can't be done map-side, has to be server-side.
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
Here's another question.
I'm trying to set up a new "spawn system", so-to-speak. There will be two spawn systems in my map, the default "spawn in a respawn room", and this.
I want to make a custom weapon spawn where when you walk over the weapon, you get changed to that class instantly and the weapon disappears and respawns in thirty seconds.
You spawn where the weapon is as well. So it essence, you seem like you picked up a weapon and were able to change class.
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
Please be open minded and don't just reply that it's only possible with a plugin, don't take it the wrong way either.
There are a ton of entities that quite possibly could do this, although I'm not the mapping master mind that some of you are and don't know every entity like the back of my hand.
 

Agentkid

L1: Registered
Feb 27, 2009
45
15
Serverside Plugins

You can make alot of different things on your map, but what you want requires major things to be changed in the server's config file. Maps cant do all the entity and program work for custom gamemodes until Valve adopts it.
 

Pseudo

L6: Sharp Member
Jan 26, 2008
319
150
I want to make a custom weapon spawn where when you walk over the weapon, you get changed to that class instantly and the weapon disappears and respawns in thirty seconds.
You spawn where the weapon is as well. So it essence, you seem like you picked up a weapon and were able to change class.
Spawning in a certain place could be done by using AddOutput on the !activator to change the targetname and then using a filtered trigger_teleport.

Forcing a player to change to a certain class may be possible using a point_clientcommand with the "joinclass" command. There might be a problem with this method when used on a dedicated server, I'm not sure.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Please be open minded and don't just reply that it's only possible with a plugin, don't take it the wrong way either.
There are a ton of entities that quite possibly could do this, although I'm not the mapping master mind that some of you are and don't know every entity like the back of my hand.
and please don't take it the wrong way when I say something like that. There wouldn't really be any way to track fallen weapons and do the kind of thing you are asking about.

What pseudo says about specific spawning is true, but that deals with pre-chosen spawn points, not dynamic anywhere type stuff.
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
and please don't take it the wrong way when I say something like that. There wouldn't really be any way to track fallen weapons and do the kind of thing you are asking about.

What pseudo says about specific spawning is true, but that deals with pre-chosen spawn points, not dynamic anywhere type stuff.

Instead of a server plugin script, do you think it'd be possible to script all this with an env_effectscript?
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
That's a model/visuals thing, it says that right on the page. :/

I know and am aware, although I was wondering if it was possible to somehow bend the rules?
Unofficially, although use it for something other than what it was designed for.
 

megawac

L4: Comfortable Member
Oct 2, 2009
180
29
Hey, for the first question wouldnt it be possible to parent a func_breakable block bullets brush to the player that would block 20 health and than use a game_text to say how much health the func_breakable has.
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
What about OnPickUp -> !activator -> SetHealth 110 ?

Hey FaTony, I tried to do what you mentioned and I couldn't get it to work. I'm trying to design a new health vial with sound effects and the such but I can't seem to do so. :/
Do you guys think you could take a look and possibly attempt to help me?
Here's an upload of the three trial-and-error health vials I'm trying to make, and some Quake textures.
Download
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Ok, now that I saw your map thread I understand a bit more what your goal is.

The weapon change class thing might be possible with a huge system of entities I have floating in my head but it all hinges on the point_clientcommand working on dedicated servers, which last I checked (~2 months) no longer does.

Maybe past-full health buffing items I think is beyond the scope of what can be done in the map. SetHealth can manipulate a player's health but cannot break the max health bound defined in the code.

You are really trying too hard to recreate Quake within TF2 on the map level. There are a lot of things and game modes in TFC we can't even recreate, going for something this far out will require you either give up some things or turn to plugins.
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
Ok, now that I saw your map thread I understand a bit more what your goal is.

The weapon change class thing might be possible with a huge system of entities I have floating in my head but it all hinges on the point_clientcommand working on dedicated servers, which last I checked (~2 months) no longer does.

Maybe past-full health buffing items I think is beyond the scope of what can be done in the map. SetHealth can manipulate a player's health but cannot break the max health bound defined in the code.

You are really trying too hard to recreate Quake within TF2 on the map level. There are a lot of things and game modes in TFC we can't even recreate, going for something this far out will require you either give up some things or turn to plugins.

I've given up (after hours and hours of contemplating with an experienced TF2 mapping friend) that feet and decided to just go with new health kits/vials. Not an overheal medkit, just a normal health item.

The new spawn system did work when we each made a custom server, but didn't work on a company-hosted server. As you said in your post.
 

Rizz

L5: Dapper Member
Dec 18, 2009
210
21
I've given up (after hours and hours of contemplating with an experienced TF2 mapping friend) that feet and decided to just go with new health kits/vials. Not an overheal medkit, just a normal health item.

The new spawn system did work when we each made a custom server, but didn't work on a company-hosted server. As you said in your post.

bump