Forums

Pages: [1] 2 3 ... 5
Author Topic: New Inf ammo and health script  (Read 61732 times)
Offline  Raiin
Soldier
*

Kangaroo-izzle
Posts: 243
Apparently, I'm a robot.
Made by My Chocoholic Father Beats Me AKA Jamien
Code: [Select]
//Personal portable regen for offline jumping!
sv_cheats 1

wait 5;ent_fire !self addoutput "targetname player_me"
wait 5;ent_fire func_regenerate addoutput "classname func_regenerate_temp"
wait 5;ent_fire info_target addoutput "classname info_target_temp"

wait 10;give info_target
wait 10;give func_regenerate

wait 20;ent_fire info_target addoutput "targetname mytarget"
wait 20;ent_fire func_regenerate addoutput "StartDisabled 1"
wait 20;ent_fire func_regenerate addoutput "mins -100 -100 -100"
wait 20;ent_fire func_regenerate addoutput "maxs 100 100 100"
wait 30;ent_fire func_regenerate addoutput "solid 2"
wait 30;ent_fire func_regenerate addoutput "spawnflags 1"

wait 30;ent_fire info_target setparent player_me
wait 33;ent_fire func_regenerate setparent mytarget
wait 35;ent_fire func_regenerate enable

wait 40;echo "I love choco so hard!"

If scripting isn't your thing or you are incredibly tired (As I was when he sent this to me).
It creates an info_target which is parented to you (A point in the map which will follow you where ever you go dead or alive) and then creates a func_regenerate box around you which is parented to the info_target (The box will surround you and constantly regenerate your ammo).

Or in simple terms, Constant ammo regeneration.

So, installation instructions...
Copy/Paste the script above into a .cfg file and name it "regen".
Place the new file into tf/cfg
Open a map in TF2
Type into console "exec regen"
Jump.

(May need hurtme, depends on fall damage / multi rockets / stickies)
« Last Edit: February 03, 2012, 08:02:26 AM by Raiin »


---------------------------
   
Offline  Wolsk
Rocketeer
****

Posts: 301
i love you
This is brilliant. :o
Thanks Choco and Raiin.


---------------------------


klanana:  I DID NOT EAT THE CAT
dellort: This mod is pretty cool, just wish the devs would fix the bug that allows MIKE to play on it.
   
Offline  Drexen
Rocketeer
***

Posts: 282
heh, sweet... never knew scripting could be done like that. all we need now is a save/teleport script :P
   
Offline  Hadokk
Rocketeer
****

Bball Server Filler Upper
Posts: 313
Okay
Good. fukken. job
   
Soldier
*

Posts: 247
heh, sweet... never knew scripting could be done like that. all we need now is a save/teleport script :P

If there is a way to store variables it would be possible.

Or maybe create a custom ent at current loc for save and tele to custom ent?
   
Offline  Raiin
Soldier
*

Kangaroo-izzle
Posts: 243
Apparently, I'm a robot.
Hmm it might already be doable, if you use 'getpos' in console. It displays your exact co-ordinates and the angles you are looking as well as the command to send you there 'setpos'. Copy/Paste the setpos co-ordinates and you have your own teleportation, or you could bind the setpos stuff it gives you to a key.

Need to use getpos every new tele you want to setup though. Unless someone knows how to use the output the console gives you to be input into a key in real time, getpos will have to do.

Edit: Actually....I think i know how already. Might get around to poking at it eventually. Probably just throw it at choco to do for me though :P
« Last Edit: January 31, 2012, 11:44:35 PM by Raiin »


---------------------------
   
Maggot
*

Posts: 10
Woh great thanks, searched long time for a health, ammo script.   :)
   
Offline  dtn
Maggot
*

Posts: 1
Cowabunga!!!
I do not have health regeneration, what I did wrong? :'(
   
Maggot
*

Posts: 42
great stuff
it is working wonders for me

I would like to know how to disable both regen and pain sounds, they are a pain in the ass
isn't it more viable to use a dedicated server with a plugin?

oh, if possible post the command to disable these sounds, hehe
thanks a lot


---------------------------
~ pewpewpew ~
   
Soldier
*

Posts: 163
Very carefully
great stuff
it is working wonders for me

I would like to know how to disable both regen and pain sounds, they are a pain in the ass
isn't it more viable to use a dedicated server with a plugin?

oh, if possible post the command to disable these sounds, hehe
thanks a lot

'viable' depends on the person really. Using a plugin requires you to download an entire dedicated server w/srcds whereas this is intended for listen servers. As for the sounds, I don't think there is a command for it, I know that on jumpit the removed sound is part of a plugin so you're probably out of luck there.
   
Offline  QuBA
Soldier
***

Posts: 134
You could probably just make an "empty" custom sound for regen and pain sounds.
   
Offline  Drexen
Rocketeer
***

Posts: 282
you could use the text files i use for removing all these sounds and are used on jump servers. only problem is you have to have a seperate one for each map
   
Offline  duppy
Fly
**

Posts: 99
I made a silent WAV sound file if someone wants to remove some sounds.  You can find the file silence.wav here:
https://sites.google.com/site/valacar/home/downloads

If you wanted to remove the regeneration sound, rename silence.wav to regenerate.wav and copy it to the folder team fortress 2\tf\sound\items\ (you'll probably have to create the "items" folder).   

Also, I just wanted to say thank you to Jamien and Raiin for posting this.  I was kind of looking into making a dedicated server with jump mods and what not, but it seemed like a big headache....this little script is good enough and lot easier to use ;D
   
Offline  duppy
Fly
**

Posts: 99
Sorry to reply right after my last reply, but I just made an addition to the script that someone might like.  Basically I just added a second source of healing so there's less chance of accidentally killing yourself.  On the technical side, what I did was add a trigger_hurt entity and gave it a negative damage value, which heals you (I think every half second) instead of hurting you.  Anyway, here's the new code:

Code: [Select]
//Personal portable regen for offline jumping!
sv_cheats 1

wait 5;ent_fire !self addoutput "targetname player_me"
wait 5;ent_fire func_regenerate addoutput "classname func_regenerate_temp"
wait 5;ent_fire trigger_hurt addoutput "classname trigger_hurt_temp"
wait 5;ent_fire info_target addoutput "classname info_target_temp"

wait 10;give info_target
wait 10;give func_regenerate
wait 10;give trigger_hurt

wait 20;ent_fire info_target addoutput "targetname mytarget"
wait 20;ent_fire func_regenerate addoutput "StartDisabled 1"
wait 20;ent_fire func_regenerate addoutput "mins -100 -100 -100"
wait 20;ent_fire func_regenerate addoutput "maxs 100 100 100"
wait 30;ent_fire func_regenerate addoutput "solid 2"
wait 30;ent_fire func_regenerate addoutput "spawnflags 1"

wait 20;ent_fire trigger_hurt addoutput "StartDisabled 1"
wait 20;ent_fire trigger_hurt addoutput "mins -100 -100 -100"
wait 20;ent_fire trigger_hurt addoutput "maxs 100 100 100"
wait 30;ent_fire trigger_hurt addoutput "solid 2"
wait 30;ent_fire trigger_hurt addoutput "spawnflags 1"
wait 30;ent_fire trigger_hurt addoutput "damage -500"

wait 30;ent_fire info_target setparent player_me
wait 33;ent_fire func_regenerate setparent mytarget
wait 35;ent_fire func_regenerate enable

wait 33;ent_fire trigger_hurt setparent mytarget
wait 35;ent_fire trigger_hurt enable


   
Maggot
*

Posts: 42
duppy, thanks a lot for your help.
but I got a doubt about the silence.wav
do I have to move it to sounds folder only?
didn't understand how to remove both pain and regen sounds
ayway, thanks again

waiting for your reply


---------------------------
~ pewpewpew ~
   
0 Members and 1 Guest are viewing this topic.
Pages: [1] 2 3 ... 5
« previous next »


spirit Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC