Jump to content

"Reloadable" rebreather


Andyno

Recommended Posts

OK so I got this script breathing for a 1 way ticket up. And the activator has to be the platform ... so take an activator and give it a platform model. Like this one in World objects \ static \ Dungeons\Industrial\Scaffolding\IndScaffoldLiftPlatform01.NIF

 

Then attach this script to it ...

 

But you have to place a collision box to mimic the top of the lift position since the collision layer won't travel with the mesh.

And set it initially disabled.

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Scn MyLiftingScript
ref ActPosZ ;this ref is for editing the position of the Activator
ref PlayerPosZ ;this ref is for editing the position of the Player
Short Start
Float Bump
float move
float timer
float Time ;this gets the timer for the if timer line
begin onactivate
if Start ==0
set Start to 1
If move == 0
set Move to 1
Set Bump to Player.getpos z + 2 ; because the player needs to be above the platform to move up
Player.SetPos z Bump
disableplayercontrols 1 0 0 0 0 0 0
Activate
endif
endif
end
begin gamemode
If Start == 1
set ActPosZ to getpos z + 1 ;since this is applied to the Activator no ref is needed
set PlayerPosZ to Player.getpos z + 1
set Time to .001 ;this is one value for the speed the object moves
if timer <Time
set timer to timer + GetSecondsPassed
else
if move > 0 ;this runs everytime after activated
if move < 769 ; <<< lift will stop here (set this to the Z pos difference between bottom and top +1)
SetPos z ActPosZ ;when this runs the reference moves
Player.SetPos z PlayerPosZ
set Time to Time + .001
set move to move + 1 ;repeats steps
if move > 768
TopPlatRef.Enable ; Collision box at top position of lift so player won't fall
Enableplayercontrols
endif
endif
endif
endif
endif
END
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The lift stop number for this particular script was for a lift on the back of Super duper mart ... so pretty tall.
For some damn reason I can't get the script to accept any reference in the position of "Myref.setpos z" Except for the Player ref . The only way I got it to work was placing the script on the activator/platform so it is the subject ref , therefore doesn't need listed in the script.
Edited by Mktavish
Link to comment
Share on other sites

  • Replies 95
  • Created
  • Last Reply

Top Posters In This Topic

Like I said - I'm trying to solve that cutscene situation by making a "no cutscene situation". All I need is to somehow fill that empty space that is between the time that player is ambushed and the time when he appears at trash compactor. I'll probably make some cave passage, although I'm not very happy about it.

 

Hmmm ... I'll give it some thought

 

 

Hidden safe??? What is that? And what does have that safe similar with the lift??? I'm absolutely lost - it seems that you're very familiar with GECK. :thumbsup:

 

Hidden safe is one of the mod resources in that guys file you listed. It is similar because he has a picture move from covering the safe.

 

There is a lot more who are beyond my Geck capabilities ... Like UhmattBravo ... I'm just a rookie , but I do like to think outside the box , and always looking to learn some more. :pirate: ArrrG

Edited by Mktavish
Link to comment
Share on other sites

I was thinking maybe scripting a collision plane to move with it might help, but I was talking about empties in a modeling program.

 

Empty what? I don't know, blender just gives me the option to add an empty. I think 3 or 4 of them should get those pistons moving pretty easily. You'd need one, at probably close to what would be ground level named scene root, another named non accum, that I would put about where "scene root" is, with scene root as a parent, and then I would make one each for both pistons, parented to "non accum", parent the top to one of the empties that I haven't named, the bottom to the other, export just the geometry as an anim static, move and keyframe the other 2 right in object mode, export just the animation. Name it "forward" open the geometry one in nifskope, choose spells -> attach animation, choose your forward.kf, save, make sure the collision is set properly and save.

 

The problem is that if they move too fast, the collision can pass through the player (you may get stuck too since it's vertical movement). I did the same thing with some planes, and since they move fairly fast they just pass right through me when they take off, so I'd have the pistons move pretty slow if I tried it that way.

 

 

Edit: and thanks for the ego boost, MkT, but I'm actually a bit of a rookie myself, you've just caught me on a few things I've had prior experience with.

Edited by uhmattbravo
Link to comment
Share on other sites

Mktavish:

Wow! That's one of the biggest scripts I used in my mods! As I understand it correctly, the script is not suitable for a return path, right? So the player can only travel up, not down?

 

uhmattbravo:

Welcome to my thread! I didn't expect that someone else will engage... so thanks... :) Anyway, your post reminded me some personal discussion I had with pixelhate some months ago. He actually made a functional lift based on *.nif, not a script. Well, although it was functional, it was not ideal (not his fault, but due to engine limitations :wallbash: ). That's why I thought that it would be much easier, and also more efficient to solve this elevator problem by script... I'm not sure if it will be any helpful, but here is his work:

https://www.mediafire.com/?5wv277g5i4lagqe

The testing cell is aaTestElevator.

Link to comment
Share on other sites

Hello gentlemen, interesting thread you have here, Andyno. :)

 

The nif elevator is a proof of concept very roughly made, I believe it can be polished a bit but as Andyno said there's engine limitations.

 

@Mktavish:

Is the script posted above the one from the guy in NV? He promised to send it to me but never did...

 

I guess the piston thing can also be done with nif animation.

Link to comment
Share on other sites

Mktavish:

As I understand it correctly, the script is not suitable for a return path, right? So the player can only travel up, not down?

 

 

 

With that paricular script so far , yes. But adding in the return trip scripting shouldn't be to much harder. Plus I believe I could put in an actual button activator as a linked ref / parent ??? But it would not take the trip with the lift platform. So would have to be another one at the top.

I just posted this one up for ya to drop in and get it working , also thinking maybe you didn't want them going back down as it looks to be the case in that Half life video.

Link to comment
Share on other sites

Hello gentlemen, interesting thread you have here, Andyno. :smile:

 

The nif elevator is a proof of concept very roughly made, I believe it can be polished a bit but as Andyno said there's engine limitations.

 

@Mktavish:

Is the script posted above the one from the guy in NV? He promised to send it to me but never did...

 

I guess the piston thing can also be done with nif animation.

 

Howdy pixelhate ... The guts of that script is from his. Which I just copy/pasted his in a new script , then edited it for my purposes. Trying to trim down its complexity so I could understand whats going on with each line. Plus that is the final product after about a dozen back and forth editing/testing.

 

Here is a copy of the script found in his mod resource ...

 

 

Scn DDDLiftScriptTEMPLATE

 

ref PlayerPosZ

ref LiftPosZ

ref LiftSoundPosZ

ref LiftSoundPos-Z

ref LiftPos

ref PlayerPos-Z

ref LiftPos-Z

float Start

float Timer

float Time

 

begin onactivate

 

set LiftPos to DDDLiftREF.getpos z

 

if start ==0

set Start to 1

playsound DDDLiftSound2 1

set Time to .001

if player.hasperk DDDIsOnLiftPerkTEMPLATE ==1

disableplayercontrols 1 0 0 0 0 0 0

else

if player.hasperk DDDIsOnLiftPerkTEMPLATE ==0

DDDTriggerDisableREF.disable 0

 

endif

endif

endif

 

if start ==500

set Start to 501

playsound DDDLiftSound2 1

set Time to .001

if player.getpos z >= LiftPos

if player.hasperk DDDIsOnLiftPerkTEMPLATE ==1

disableplayercontrols 1 0 0 0 0 0 0

else

if player.hasperk DDDIsOnLiftPerkTEMPLATE ==0

DDDTriggerDisableREF.disable 0

 

endif

endif

endif

endif

end

 

begin gamemode

 

if start >0

if start <500

set PlayerPosZ to player.getpos z + 2

set LiftPosZ to DDDLiftREF.getpos z + 2

set LiftSoundPosZ to DDDLiftSoundREF2.getpos z + 2

 

if Timer < Time

set timer to timer + GetSecondsPassed

else

 

if Start >0

if Start <500

DDDLiftREF.setpos z LiftPosZ

DDDLiftSoundREF2.setpos z LiftSoundPosZ

Set Time to Time + .001

set Start to Start + 1

if player.getpos z > LiftPos

if player.hasperk DDDIsOnLiftPerkTEMPLATE ==1

playerref.setpos z PlayerPosZ

 

 

endif

endif

endif

endif

endif

endif

end

 

begin gamemode

 

if Start == 151

set Start to 500

enableplayercontrols

DDDLiftMarkerREF.enable 0

DDDTriggerDisableREF.enable 0

 

endif

end

 

begin gamemode

 

if Start >500

DDDLiftMarkerREF.disable 0

set PlayerPos-Z to player.getpos z - 2

set LiftPos-Z to DDDLiftREF.getpos z - 2

set LiftSoundPosZ to DDDLiftSoundREF2.getpos z - 2

 

 

if Timer < Time

set timer to timer + GetSecondsPassed

else

 

if Start >500

DDDLiftREF.setpos z LiftPos-Z

DDDLiftSoundREF2.setpos z LiftSoundPos-Z

Set Time to Time + .001

set Start to Start + 1

if player.getpos z > 8373 ;The height (z) of the original placement of the lift.

if player.hasperk DDDIsOnLiftPerkTEMPLATE ==1

playerref.setpos z PlayerPos-Z

 

endif

endif

endif

endif

endif

endif

end

 

begin gamemode

 

if Start == 651

set Start to 0

enableplayercontrols

DDDTriggerDisableREF.enable 0

 

endif

end

 

 

 

All of what he has in that mod is set up in goodsprings. And there is some tutorial videos linked on his nexus page for that file. I have a hard time following him in them because he moves pretty fast ... and seems to gloss over some of the important finer points. But still it helped me understand the whole concept better , of which I'm still learning.

 

The important fine points I've learned so far are.

 

1 ... the lift platform has to be an activator with the script attached (for Fo3 anyways)

2 ... the player has to start slightly above the platform , and must have their movement disabled (forward/back/side/jump)

3 ... hmmm I thought there was another fine point , but can't remember ... except I had to lean on the activate block a bit , cuz I kept breaking the game mode block.

 

Add Edit: What do you mean by engine limitations with your model animation ?

Edited by Mktavish
Link to comment
Share on other sites

I was thinking maybe scripting a collision plane to move with it might help, but I was talking about empties in a modeling program.

 

 

Ya I'm a total noob with any modeling programs ... haven't felt the need to look at any of them so far ... Just figuring out the geck has been about all the attention span I can spare so far ... hehe
I had zero luck in getting a collision plane to move in that script ... was trying to make it so the player could move plus maybe an npc could ride along. What's been your method for moving one ?
Edited by Mktavish
Link to comment
Share on other sites

your post reminded me some personal discussion I had with pixelhate some months ago. He actually made a functional lift based on *.nif, not a script. Well, although it was functional, it was not ideal (not his fault, but due to engine limitations :wallbash:Â ). That's why I thought that it would be much easier, and also more efficient to solve this elevator problem by script... I'm not sure if it will be any helpful, but here is his work:

https://www.mediafire.com/?5wv277g5i4lagqe
The testing cell is aaTestElevator.

What problems are you running into with that? I copied the script and plopped one in Novac and it worked really well other than just my guy's knees twitching a little from the fall on the trip down, but that's pretty much expected.

Link to comment
Share on other sites

Oh for FFF sakes ... sorry guys.

I figured out why my geck would not accept ref-ids with commands.

My problem was because of using numbers for the prefix on pretty much anything ... Example: I have been using "00" on everything I create ... that is 2 zero's.

Anyways ... that is why the engine would not accept a reference in the spot of "MyRef.Setpos Z" Cuz my ref started with a number.

 

And yet another fine point I have learned.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...