Page 1 of 1

Changing the behavior of an existing door

Posted: Wed Aug 27, 2003 2:26 am
by Random
Ok kiddies i had a big idea but my knowledge to execute this idea is limited.

Lets say i wanted to change the opening angle of an existing door. What would be the "smoothest" way to access the door and change it's behavior ie. opening angle while still allowing the door to open and close at its regular angles as well if i approach the door in a different manor.

Please let me know if what i am askin is vague in anyway.

THanks all
Random

Posted: Wed Aug 27, 2003 6:55 am
by jv_map
Hmm yeah honestly I find it a bit vague but it may just be me :?

Do you want to change doors in stock maps?
Or, do you want to dynamically change the opening angle of the door from script?

Ah JV just the guy i was lookin for

Posted: Wed Aug 27, 2003 7:47 am
by Random
both i think. Forgive my ignorance in this department but i am learning as i go still.

I want to limit the number of degrees a func_rotating door opens. So instead of 90 just say 45.

The problem is i dont know how to call for the door in a script. Any ideas or does this bring things into focus?

Thanks

Posted: Wed Aug 27, 2003 9:16 am
by jv_map
Oh I see :)

Simply assign a targetname to the door in Radiant:
key / value
targetname / door (for example)

*recompile*

Then in the script you can type:
$door openangle 45
(below level waittill prespawn)

Posted: Wed Aug 27, 2003 9:26 am
by Random
OK recompile isnt an option at this point. Let us look at a door in V2 for example if i wanted all or any one of the doors in v2 to only open up 45 degrees what would be the best way to access how that door operates ...ack where is Bjarne when you need him... Ok i will just spill the beans here and i hope this helps out a bunch.

What i want is a "sneaky door" or a door that only opens up a few degrees to peak in side and also doesnt make a peep when open and closing if you say walk up to it in stealth mode. One problem is i dont know how to access the door to start changing how it acts. Im thinking scripting is the key and in the manual it says the trytoOpen is the ...something or other that is used when a door opens and closes. It calls for sounds and checks angles im guessing. Also i want to make it a server side thing so that peeps who like to run tactical mods can use it. No point in sneakin all over the place just to have the dang doors give you away.

So what you think? Can you help me get this bird off of the ground?

PS when it comes to mapping and scripting Consider me the best block assembler you ever saw. Scripting im reading up on it but it wont help me out enough right now.

Posted: Wed Aug 27, 2003 9:32 am
by jv_map
Well if the doors in v2 don't have a targetname I'm afraid there's nothing you can do from scripting :(

Posted: Wed Aug 27, 2003 9:38 am
by Random
RATS!!!!!!!

This is a most unfortunate developement......i will brain storm and get back to you...wait a sec hey the doors do have model numbers....t1, t4.t7,t12 etc etc and each number is unique to each door......

Posted: Wed Aug 27, 2003 8:30 pm
by nuggets
models numbers only store information about it's size origin and texture use,

a model number can be applied to a different script object providing it's not using lightmap's in the shader file, but other than that, they have no use :(