shooting doors to open them (health)

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

shooting doors to open them (health)

Post by m4rine »

I have a func->rotating door with an origin and everything working fine. However I want this door to be shot open, and i have tried key:health value:100 (and i have tried loads of other values ranging from 1 to 400)but it doesn't seem to work. It won't open; and it wont be shot open. I have posted about this before about almost a year ago, but i got no solution.

I have also tried the door without 'health' set, but in the console when i try to open it it says 'Door is jammed'. I supposed this was something to do with the numerous models surrounding my door, which don't visually touch the door, but the boundry of them (in the 2d view, when they are selected) does. But that's not the main problem; i can easily remove the models if possible.

I wonder if I should attempt to set 'health' in my script? Or would this have no effect if the key/values wouldn't work?

Anyway, another theory of mine (they're all probably way off the mark) is that some of the other key/values i have set interfere with this setting. There are no checkboxes set. This is a list of the settings:

Key - Value
classname - func->rotatingdoor //well, obviously this is ok
angle - 90 //doubt this is a problem
alwaysaway - 1 //unsure, see below*
health - 100 //obviously a problem - it doesnt work

*Can I use key:alwaysaway value:1 on this door? Because I would want the door to be shot open away from the player. This may be causing the problem, but i am positive i have tested it with and without this setting and both have the same affect: a door that won't, in any way, open.

Anyway, that's about it. I have included the most information I thought relevent, i know how anoying if people post 'My door won't work, please help me!' and don't give any symtoms or information like what type of door it is (I'm talking about posts in general there; not just posts about doors).

Any help would be absoblutely great (i've been trying to get this sorted for so long; and i have tried myself to get it working, and there are so many better mappers than me at .map).

Cheers,

m4rine
"We must become the change we want to see in the world" (Mahatma Gandhi)
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

seems not to work. but u can script it like
make the door (doorbrush+originbrush) not a func_rotatingdoor but a script_object (with e.g. targetname/door)
place 2 func_multiple on each side (with e.g. setthread/open1 or setthread/open2, and DAMAGE checked)

and do a script like

Code: Select all

open1:
	$door time 1
	$door rotateYdown 90
	$door waitmove
	wait 5
	$door time 1
	$door rotateYup 90
	$door waitmove
end

open2:
	$door time 1
	$door rotateYup 90
	$door waitmove
	wait 5
	$door time 1
	$door rotateYdown 90
	$door waitmove
end
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

For your func_rotateingdoor set the targeted flag

make a trigger_multiple and set the damage flag

Have the trigger target the door and have it covering it .

shoot the door :)
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post by wacko »

:oops: looks a bit easier, i should have triggered more brains before posting :roll:
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

scripted

Post by tltrude »

You can also have the trigger_multiple run a setthread like this.

door_1_opener:

local.player = parm.other
$door_1 open local.player

end

Or, you can use a script_origin (with a targetname) as a fake player. Doing that comes in handy for remote doors. Be sure to set your trigger to "not_player" or it will open when a player just touches the trigger.

Another option is to just make the door a func_crate.
Tom Trude,

Image
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

alwaysaway doesnt do anything, and probably never will, u might aswell take it out, though i dought it is ur problem.
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

Post by m4rine »

omniscient wrote:alwaysaway doesnt do anything, and probably never will, u might aswell take it out, though i dought it is ur problem.
Um, sorry do disagree with you but, yes alwaysaway does do something. It does exactly what it says - makes the door open always away from you. But you have to team it up with something - here is how it should work (and believe me it does):

If you want the door to open always away from the player, enter key/value alwaysaway/1.
Now, give the door a key/value angle/***, where *** depends on how your door is positioned in the top-view:
A | like door gets no angle or 0 or 180
a ----- like door gets an angle of 90 or 270 .
A / like door gets 135 and a \ gets 45. Always perpendicular to the door brush.

I have tried and tested it, it works :wink:
"We must become the change we want to see in the world" (Mahatma Gandhi)
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

the angels work without alwaysaway, but alwaysaway wont work without an angle so i dont see why u would bother putting it in.
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

For a cs map I did once I had a little breakable chunk around the door knob. You shoot and break that bit and it triggers the regular old door to open.
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

If you use both ideas the setthread and trigger you can do that sumo . The trigger does not have to cover the door it can cover a script_object that looks like a chain or something and the setthread can explode it useing the global/exploder.scr with the exploderfire model being one from the models/emitters directory , what does the adamspark.tik look like?.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Post by tltrude »

m4rine -- Alwaysaway 1 is default for rotating doors, so setting it is redundent. Alwaysaway 0 will make the door open only in the direction of the set angle.
Tom Trude,

Image
Krane
Lieutenant General
Posts: 782
Joined: Sat May 31, 2003 4:18 pm
Location: California, USA
Contact:

Post by Krane »

I'm with omniscient: this thing never worked with me. I've try what tltrude says and....0..nothing. I was always very curious about that issue...So I use the angle stuff. :?
Image
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

Post by m4rine »

um.. i aint just sayin this but, really, it worked for me. My door used to open away one direction and towards me the other - alwaysaway sorted that for me.

o well, prob my brain :?
"We must become the change we want to see in the world" (Mahatma Gandhi)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

angle

Post by tltrude »

The default angle, if no angle is set, is 0 (same as 360). So, if your door is facing that direction, it will work normally with no angle set. But, doors on the other axis must have the angle set correctly.

Image

A door with a bad angle will sometime appear to work fine, depending on which side of the door (left or right) you are looking at when you hit use.

You don't have to take my word for it, you can make a test map like the one above. Try "alwaysaway 1" on the bad doors and you'll see it does nothing. Then try "alwaysaway 0" on the good doors--they will only open one way. My Door2 tutorial map has some "alwaysaway 0" doors--kitchen cupboards and the elevator doors below.

http://pages.sbcglobal.net/tltrude/Temp/door2.zip

Image
Tom Trude,

Image
m4rine
Major General
Posts: 714
Joined: Fri Apr 11, 2003 5:28 pm
Location: UK

Post by m4rine »

actually it was Wacko who first told me about alwaysaway - see this post - scroll down till you see his reply.

i still stand by my word - it worked for me.

cmon wacko, back me up pls!
"We must become the change we want to see in the world" (Mahatma Gandhi)
Post Reply