Sign in to follow this  
Followers 0
DsoS

Elevators in Oblivion

34 posts in this topic

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:

0

Share this post


Link to post
Share on other sites

Already long done in RST so...I'm not crediting you just for the record :lmao:

0

Share this post


Link to post
Share on other sites

I actually used flat planes for my elevators. And other things too.

I released that mod several years ago. :lmao:

0

Share this post


Link to post
Share on other sites

:poke: DR you best credit me :lmao: jk jk

well I tried to have a break through XD

0

Share this post


Link to post
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

0

Share this post


Link to post
Share on other sites

I used a simple script that 'moves' the elevator floor up or down using "SetPos Z".

Its a little bumpy, but it works okay.

0

Share this post


Link to post
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.

0

Share this post


Link to post
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?

0

Share this post


Link to post
Share on other sites

Wasn't there a problem that with setpos command collision stays in place unless the object gets disabled&enabled?

I can make you animation, but not at the moment.

0

Share this post


Link to post
Share on other sites

I'd like to see if I can script this, before going with custom animation, as I might use it in other areas for longer runs. I have several places in thought for this.

0

Share this post


Link to post
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]

0

Share this post


Link to post
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:

0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

Thank you very much Willie, more Thanks than I could give in a day or even a week. :hugs: and more :hugs:

0

Share this post


Link to post
Share on other sites

The elevator works amazingly, except for one small issue.... when it is first activated it moves up, I need it to move down. After that, it works perfectly :)

0

Share this post


Link to post
Share on other sites

flip the switch in the 'OnActivate' block.

0

Share this post


Link to post
Share on other sites

what is the switch you are speaking of?

0

Share this post


Link to post
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]

0

Share this post


Link to post
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
0

Share this post


Link to post
Share on other sites

There is only one switch, 'vatorStatus'.

lol that's what I thought ... I seriously did try a few things in that block, but did it wrong XD

I changed the wrong values

Thank You again.

0

Share this post


Link to post
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.

0

Share this post


Link to post
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?

0

Share this post


Link to post
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
0

Share this post


Link to post
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]

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0