lfnetwork.com mark read register faq members calendar

Thread: door that rotates open.
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 11-15-2003, 09:33 PM   #1
fahtajorj
Rookie
 
fahtajorj's Avatar
 
Join Date: Sep 2003
Posts: 44
door that rotates open.

is it possible to make a door that rotates open like its on a hinge?

and if so could you tell me how :)
fahtajorj is offline   you may: quote & reply,
Old 11-15-2003, 10:30 PM   #2
lassev
cryptoscripter
 
lassev's Avatar
 
Join Date: Jun 2002
Location: Finland
Posts: 1,087
Sure it is. With scripting. You need but one func_static that has the origin brush where you want the hinges to be (in the XY coordinates, and no need for multiple origins of course). Then in BehavEd you rotate the func_static the way you like, to the direction you desire. Mess around with the rotate command a little bit. It might not work quite the way you thought it would. It only takes in absolute direction values corresponding to the original angles of the brush in radiant, so it doesn't in a certain sense remember previous rotations.

If you haven't scripted before, then you should just first familiarise yourself with ICARUS, and only then build you hinged doors.

Well, this was the way in JO. It bet it's not much different in JA.
lassev is offline   you may: quote & reply,
Old 11-15-2003, 11:28 PM   #3
fahtajorj
Rookie
 
fahtajorj's Avatar
 
Join Date: Sep 2003
Posts: 44
thank you very much for your help.

alright a few questions. could you explain in greater detail how i implement the script and how i have it so it rotates when a player goes a certain place.

Last edited by fahtajorj; 11-16-2003 at 12:18 AM.
fahtajorj is offline   you may: quote & reply,
Old 11-16-2003, 10:01 AM   #4
lassev
cryptoscripter
 
lassev's Avatar
 
Join Date: Jun 2002
Location: Finland
Posts: 1,087
Most likely you want to place one trigger_multiple around the door. It should be long enough so that it stretches throught the door (in this case func_static) to both side of it. So that no matter from what direction you approach the door, the trigger would launch. The just set some wait value to the trigger, like 5 seconds (needs probably to be adjusted), so that the script won't try to launch too many times in too short a time. Target the trigger to a target_scriptrunner.

In the scriptrunner, set "count" to "-1", so that the door can be opened as many times as wanted. Then enter "usescript" key and as the value: "mymapname/hingeddoor". That is of course the path to the script and the actual script name. Naturally you must have under script folder a subfolder named after your map's name.

Ah, the func_static itself. Like I said, you need to have the actual visible door composed of as many brushes as you want. Then just insert the origin brush. It's just a brush covered with system/origin, an ugly orange shader. The exact center of that origin brush is the center of rotation. So if you look the door from above, the center of the origin brush needs to be where your hinges lie. The origin brush won't show ingame, it's just in the editor, and it doens't even need to be inside the actual visible entity. Give the func_static a "script_targetname" key with a value: "hingedoor".

Then you need to launch the good old, trustworthy BehavEd, and make the script. Start it with:

//Generated by BehavEd

affect ( "hingedoor", /*@AFFECT_TYPE*/ FLUSH )
{

task ( "opendoor" )
{
rotate ( < 0.000 90.000 0.000 >, 1400.000 );
}

task ( "closedoor" )
{
rotate ( < 0.000 0.000 0.000 >, 1400.000 );
}

dowait ( "opendoor" );
wait ( 3000.000 );
dowait ( "closedoor" );
}

Now, this script would rotate the func_static to point to the direction of 90 degrees in Radiant definition (in 1.4 seconds). If you don't set any angles to an entity in Radiant, it considers itself to point to 0 (=360) degrees, and so it would turn 90 degrees. In effect this script turns it 90 degrees, waits for 3 seconds, and returns it to point to 0 degrees, that is, to the original orientation. Save the script with a name hingeddoor, compile it and copy the .ibi file to the appropriate folder.

Of course, at some point, you might want to add horrible, rusty grating sound to the door, but I'm sure you are quite famialiar with that kind of procedures already.

That should be it. Most likely I forgot something, but this should give you some impression of the deeds needed to do the trick.
lassev is offline   you may: quote & reply,
Old 11-16-2003, 11:05 AM   #5
fahtajorj
Rookie
 
fahtajorj's Avatar
 
Join Date: Sep 2003
Posts: 44
thank you so much! i am a complete noob to scripting, and had no idea what to do.
fahtajorj is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Mapping > door that rotates open.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:54 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.