|
|
Was wondering if anyone out there knows how i can possibly create a door that opens the way i want it to and not the way Morrowind wants it to.
What i need is a stone door in two halves (it occurs to me i may have to make one and copy it and swivel it around), and when you click on the door, they slide apart from each other.
The only simily i can think of is the doors in star trek. I want a door that is split in two and opens sideways away from each other.
I'm fluent in 3dsmax and creating things for the game, all i really need to know is if i have to animate it in 3dsmax (and if so, what's the frame length for a door opening) or is it scripted in to doors in the construction set. I looked around and couldnt find one. Maybe im missing something
- Steve_theslayer
===================================================
I think (I'm really not sure) that "door" objects just open by default by rotating 90 degrees about their z-axis, I'm not sure there's a way to change this. However, it would be very easy to make the two door-halves seperately and script them to open like you have in mind.
If you're interested, I can post a sample script to show you how this might be accomplished.
----------------------------------------------------------------
That'd be really helpful, thanks. It's a shame Beth didn't hardcode sideways doors into the game as an option on the doors themselves, seems kinda odd to make them all mandatory swinging open (especially when a good few need to slide open in the game itself)
I'm still only on the basics of scripting, so i know i'd screw it up if i did it myself.
What i'd ideally like is for the script to tell one door (lets arbitrarily name it i_door_01 ) to go -70 on the x axis, and for the door next to it (i_door_02) to go 70 on the x axis (ie, sliding apart)
I'd put this script into an activator button/switch so people can press it and open the doors. And if they automatically closed after say 20 seconds that would be perfect!
-----------------------------------------------------------------------
Ok, here's a script that should do what you want. It is completely untested of course, but it will work as long as I didn't make a stupid syntax error or something:
Code:
begin i_door_script ;attach this script to the switch that opens the doors
short move
short state
float timer
if ( onActivate == 1 )
if ( state == -1 ) ; doors are moving
return
elseif ( state == 0 ) ; doors are closed
set move to 1
PlaySound, "Door Stone Open" ;you can use a different sound, of course
elseif ( state == 1 ) ; doors are open
return
endif
endif
if ( move == 1 ) ;open the doors
set timer to timer + GetSecondsPassed
if ( timer <= 5 )
set state to -1
i_door_01 -> moveWorld, x, -14
i_door_02 -> moveWorld, x, 14
elseif ( timer > 5 )
if ( timer < 20 )
i_door_01 -> setPos, x, 270 ; instead of 270, enter in the exact x position you want this piece to be in when the door is open
i_door_02 -> setPos, x, 130 ; again, exact x position of this piece when open
set state to 1
elseif ( timer <= 25 )
set state to -1
i_door_01 -> moveWorld, x, 14
i_door_02 -> moveWorld, x, -14
elseif ( timer > 25 )
i_door_01 -> setPos, x, 200 ; whatever the x pos is when the door is closed
i_door_02 -> setPos, x, 130 ; same as above, for this ID instead
set state to 0
set move to 0
set timer to 0
endif
endif
endif
end
![[Page visit counter]](http://counters.direct.zyweb.com/counter/username/redwoodtreesprite_118/key/NCMBKSG/)
|