Page 1 of 3
Making Barbwire Hurt?
Posted: Wed Mar 05, 2003 4:33 am
by Sgt.Pepper
Hey There,
I asked this at TMT, but I'm afraid I didn't quite understand the response I got, and to avoid making myself look more like a idiot there, I decide to show you guys my lack of knowledge!
I'm working on a fix for a custom map, a player can leave the boundries of the map, and I have barbwire placed there to stop the player from leaving. The wire is there fine, but I would like it to inflict pain on the player. It is for SH. I'll put what I have so far. Thanks in advance.
//Allie Map Fix
local.wire = spawn script_model
local.wire model "static/barbwire_long_two_post.tik"
local.wire.origin = ( 3279.00 -82.00 384.00 )
local.wire.angles = (0 0 0)
local.wire.scale = 0.70
local.wire solid
local.trig = spawn trigger_multiple
local.trig origin ( 3279.00 -82.00 384.00 )
local.trig setsize ( 0 0 0 ) ( 64.00 448.00 128.00 )
local.trig setthread _mythread
local.trig wait 0.05 // How often the trig acts
local.trig delay 0 // How long before trig acts
_mythread:
local.player = parm.other
local.player hurt 96 // Cause 10 hurt every time
I'm tired and I may have forgotten to tell you something, if so then please ask. Thanks again.
HURT ME
Posted: Wed Mar 05, 2003 4:51 am
by Gen Cobra
Ok here is how I make stuff hurt.
much easier
Right click and make a trigger around the barbwire where you want it to hurt.
press n and give it
key/targetname
value/hurtme(you can make one up but this is mine)
key/setthread
value/pain(you can make one up but this is mine)
key/wait
value/1
Now that's done. You can copy this trigger as much as you want but MAKE SURE the target is right after you copy it.
Now open your .scr and insert these lines after 'level waittill spawn'
pain:
$hurtme volumedamage 25
end
that's it
you can change the volume of the damage to 100 or 50 or whatever. It changes the amount of life taken when you are hit by the trigger. The wait is for how many secondds to wait before the player gets hit with the damage. I use 1 cause it works well and 25 for the volume because the player doesn't get wiped out when he touches the trigger.
Hope that helped!
Posted: Wed Mar 05, 2003 7:04 am
by mohaa_rox
His method is easier.
Posted: Wed Mar 05, 2003 7:55 am
by Gen Cobra
How can his be easier? Look at the script then look at what I did. It took me 5 min to apply fire to an entire map and have it hurt the player.
Posted: Wed Mar 05, 2003 8:00 am
by mohaa_rox
"His" as in you, Gen Cobra.

Posted: Wed Mar 05, 2003 11:53 am
by Sgt.Pepper
Thanks for your reply, but I'm doing this entirely through scripting, will that method work with scripting?
Posted: Wed Mar 05, 2003 11:56 am
by mohaa_rox
Not with scripting alone. You need mapping for the trigger multilpe.
Posted: Wed Mar 05, 2003 12:42 pm
by Gen Cobra
How come everyone scripts everything?? ? Why not map it to ensure that it works? I'm confused as to why you would just script it. It sounds easier but a little cheap.
Posted: Wed Mar 05, 2003 1:02 pm
by Bjarne BZR
Try to compile one of my maps
Cobra, and you'll see why you would like to script things

( to not be forced to recompile ).
Posted: Wed Mar 05, 2003 1:33 pm
by Gen Cobra
I think I answered this to the best of my knowlege. I never script out anything I can do in the editor. I always wait to recompile and fix problems. That way I know it got fixed.
Posted: Wed Mar 05, 2003 2:16 pm
by mohaa_rox
Scripting rules!!!!!!!!!!!!!
Posted: Wed Mar 05, 2003 3:34 pm
by MPowell1944
When I made Stalingrad 2, I used scripting to hurt the player that touched the barbwire. Had a trigger_multiple with a setthread, and the thread activated the .scr file for a bullet hit, hence the player would be hit with a bullet with set amount of damage everytime they touched the trigger. Worked quite well for using script.
Posted: Wed Mar 05, 2003 6:13 pm
by Sgt.Pepper
Yeah, I'm not doing it through mapping because it's not my map that I'm doing it for. It's a custum map, made by someone else, and we are running it on our server. And also, I've done lots of searching, and I think it may be done through scripting. Not too sure, though. But since the hole is patched, there is rush for it, I just want to be able to do it for the knowledge, and the challenge. I'm new to scripting, and I want to see what can be done.
Mpowell, Yeah, I was looking at the script that you have for Stali2 and the one for Omaha SE. But I'm afraid that I don't understand it too much. Plus, if at all possible, I would like to have this all in one script without having to go into another folder.
Now, I'm wondering if a trigger_hurt will work. I've read that it won't work in AA, but since this is for SH, perhaps it will. I think I've tried it, so that leads me to believe that I've messed up somewhere else in my script. Any suggestions?
Posted: Wed Mar 05, 2003 11:02 pm
by Sgt.Stafford
Y didnt I think of that name.........

'Sgt.Pepper
Posted: Thu Mar 06, 2003 12:11 am
by MPowell1944
If you missed
this, then I feel bad for you.
