Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Elevators in Oblivion


DsoS
 Share

Recommended Posts

So yeah I found this out when I got bored of running though my mod I'm working on, and decided to play on a big rock and play with console commands..... plus I didn't feel like running up a long curvy cave tunnel to hit a Trigger Zone to activate a wall of rocks to open up, so I cheated there....

Afterwards, I threw this into a test area I have and made this video :woot:

You can use this idea freely, but all I ask is for a little credit for the idea and maybe some cookies :thumbup:

Link to comment
Share on other sites

I need an elevator animation using the "RFTrapPitGrate01"

It needs to be able to move both Up and Down... It must move a total of 634 units

The first position must be Up and it moves down... see image below :)

elevatorw.th.jpg

Think someone can do this, please?

I'm not sure if the Grate nif has anything to make it dangerous to players, if it does can you remove it please? (I know in the CS, there is a option for this as "Dangerous" so I'm not sure if its the CS that does it or if its the nif file.)

In the picture where it says, Ends Here... the grate needs to be on the ground, but not clipping it.

Thank You in Advanced

DSoS

Link to comment
Share on other sites

Willie,

How would I go about using SetPos?

I looked at the CS page about it, and no real description on how to use it properly.

I'm thinking that I will allow the player to Activate the Grate by clicking on it, for the Up and Down movement.

Link to comment
Share on other sites

Morrowind had a Move command, that would allow you to set the rate the object moves at, made for nice smooth elevators. (I used these in a dwemer ruin I was working on for Fliggerty....) Oblivion doesn't seem to have that command..... Bummer.

I wonder if you did the setpos in small enough increments, if that would smooth things out a bit?

Link to comment
Share on other sites

You CAN make the lift move at the same speed, no matter how fast or slow your computer is. You use the timer function to do it. You just adjust the math on the GetSecondsPassed to make it go faster or slower. And it will move at that speed on everyones computer.

scn myLiftScript
float curpos
float endpos
short vatorStatus

begin onactivate player
if vatorStatus == 0
set endpos to getpos z + 186
set vatorStatus to 1
message "Going Up!"
elseif vatorStatus == 1 || vatorStatus == 3
message "The Lift is in motion!"
elseif vatorStatus == 2
set endpos to getpos z - 186
set vatorStatus to 3
message "Going Down!"
endif
end

begin gamemode
if vatorStatus == 1
set curpos to getpos z
if (curpos < endpos)
;MOVING LIFT UP
set curpos to curpos + (GetSecondsPassed * 0.75)
setpos z curpos
else
;FINAL UP POSITION - SET EXACT Z
set vatorStatus to 2
setpos z 7286
endif
elseif vatorStatus == 3
set curpos to getpos z
if (curpos > endpos)
;MOVING LIFT DOWN
set curpos to curpos - (GetSecondsPassed * 0.75)
setpos z curpos
player.resetfalldamagetimer
else
;FINAL DOWN POSITION - SET EXACT Z
set vatorStatus to 0
setpos z 7100
endif
endif
end[/code]

Link to comment
Share on other sites

Willie woah, wow, I ummm did not know it would involve this much scripting. I really really apperiacate you writing the script for me. I've already added you to the readme for other scripts you've created for me and also scripts from one of your mods.

I do have some questions for my knowledge...

1) set endpos to getpos z + 186 and set endpos to getpos z - 186

What does the "186" do?

2) set curpos to curpos + (GetSecondsPassed * 0.75)

I would change the 0.75 to higher if I want it faster, or lower if I want it slower, correct?

3)player.resetfalldamagetimer

I'm taking a guess that the player might be able to get hurt on this?

Again Willie, Thank You very much for your help on this. You saved me a full days worth of work, if I were not able to find a fix for my issue, I would have to rebuild a part of this cell and I really didn't want to. Thank You :hugs:

Link to comment
Share on other sites

1) set endpos to getpos z + 186 and set endpos to getpos z - 186

What does the "186" do?

Its how far the lift is to move. I was moving a very short distance, so I only needed it to move 186 units up and down.

2) set curpos to curpos + (GetSecondsPassed * 0.75)

I would change the 0.75 to higher if I want it faster, or lower if I want it slower, correct?

Yes. So 1 would move it one unit per second. 5 would be 5 units per second. Where 0.75 would be 3/4 a unit per second.

3)player.resetfalldamagetimer

I'm taking a guess that the player might be able to get hurt on this?

Its possible. Sometimes the fall collision has a hiccup and you get hurt.

Link to comment
Share on other sites

There is only one switch, 'vatorStatus'.

begin onactivate player
if vatorStatus == 2
set endpos to getpos z + 186
set vatorStatus to 1
message "Going Up!"
elseif vatorStatus == 1 || vatorStatus == 3
message "The Lift is in motion!"
elseif vatorStatus == 0
set endpos to getpos z - 186
set vatorStatus to 3
message "Going Down!"
endif
end
[/code]

Link to comment
Share on other sites

Can I just say you have just done EXACTLY something I wanted to do so badly in my own mod that I absolutely have to hijack that script, Willie?

:clap:

However, it would appear that I am having problems with the collision for my elevator model not updating when the script is triggered, as every time I try to get on, I simply fall through the floor until I reach the original position of the model.

I only need a snippet of the original script, as I only need for the elevator to move up, however, the major difference between yours and mine at this point is that it is being activated with a switch, rather than by the player directly.

scn TKLeverBridgeRaiseScript2


float curpos

float endpos

short vatorStatus


begin onactivate

        if vatorStatus == 0

                set endpos to getpos z + 832

                set vatorStatus to 1

                message "Going Up!"

        endif

end


begin gamemode

        if vatorStatus == 1

                set curpos to getpos z

                if (curpos < endpos)

                        ;MOVING LIFT UP

                        set curpos to curpos + (GetSecondsPassed * 30)

                        setpos z curpos

                else

                        ;FINAL UP POSITION - SET EXACT Z

                        set vatorStatus to 2

                        setpos z -128

                endif

        endif

end
If need be, I can workaround by adding this snippet at the end:
	if getpos z == -128

		If togglevar == 0

			disable

			set togglevar to 1

		elseif togglevar == 1

			reset3dstate

			set togglevar to 2

		elseif togglevar == 2

			enable

			set togglevar to 3

		endif

	endif

But, of course, that will cause the bridge piece to flicker on screen, and I'd like to avoid that if possible. What happens in between the activation and the finish is unimportant, as the player is not intended to be on the platforms when they are ascending.

Edited by ThomasKaira
Link to comment
Share on other sites

Well from what I've tested, when it works, the collision stays with the grate.

Okay, I got the switch flipped around like you said to do, I used the script you gave on the first page.

It now moves down when first activated. But now when it should go up, it goes down (continuous loop per activation, does not ever go up) XD



scn aaDSoSFNSElevatorScript


float curpos

float endpos

short vatorStatus


begin onactivate player

        if vatorStatus == 2

                set endpos to getpos z + 634

                set vatorStatus to 1

                message "Going Up!"

        elseif vatorStatus == 1 || vatorStatus == 3

                message "The Lift is in motion!"

        elseif vatorStatus == 0

                set endpos to getpos z - 634

                set vatorStatus to 3

                message "Going Down!"

        endif

end


begin gamemode

        if vatorStatus == 1

                set curpos to getpos z

                if (curpos < endpos)

                        ;MOVING LIFT UP

                        set curpos to curpos + (GetSecondsPassed * 50) 

                        setpos z curpos

                else

                        ;FINAL UP POSITION - SET EXACT Z

                        set vatorStatus to 2

                        setpos z 2543

                endif

        elseif vatorStatus == 3

                set curpos to getpos z

                if (curpos > endpos)

                        ;MOVING LIFT DOWN

                        set curpos to curpos - (GetSecondsPassed * 50)

                        setpos z curpos

                        player.resetfalldamagetimer

                else

                        ;FINAL DOWN POSITION - SET EXACT Z

                        set vatorStatus to 0

                        setpos z 1909

                endif

        endif

end


any idea?

Link to comment
Share on other sites

The object you use for the floor must be a special object that allows the collision to move with it.

You could check my 'MadHouse' mod at the floor I used for my lift.

Not really an option for me, I'm afraid. I have to be very specific with the models I'm using at this point.

Fortunately, because the player is not intended to be on those platforms when they are moving, I can simply use that workaround snippet to do the job. The platforms will flicker when their collision data is reset (because this needs to happen while they are disabled), but I don't think there is another option here.

Unless OBSE can do something with this that normal CS scripting functions can't. If not, animation is the only option left.

Edited by ThomasKaira
Link to comment
Share on other sites

You probably need to change the status as well.

And perhaps change the 'plus' and 'minus' signs as well.


begin onactivate player
if vatorStatus == 2
set endpos to getpos z - 634
set vatorStatus to 3
message "Going Up!"
elseif vatorStatus == 1 || vatorStatus == 3
message "The Lift is in motion!"
elseif vatorStatus == 0
set endpos to getpos z + 634
set vatorStatus to 1
message "Going Down!"
endif
end
[/code]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...