Changing the behavior of an existing door

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Changing the behavior of an existing door

Post 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
Moderator
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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?
Image
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Ah JV just the guy i was lookin for

Post 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
Moderator
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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)
Image
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post 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.
Moderator
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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 :(
Image
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post 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......
Moderator
Image
nuggets
General
Posts: 1006
Joined: Fri Feb 28, 2003 2:57 am
Location: U-england-K (england in the UK) :P
Contact:

Post 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 :(
hope this helps, prob not cos it's all foreign 2 me :-/
Post Reply