Mktavish Posted October 13, 2016 Share Posted October 13, 2016 (edited) 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 Activatorref PlayerPosZ ;this ref is for editing the position of the Player Short StartFloat Bumpfloat movefloat timerfloat Time ;this gets the timer for the if timer line begin onactivate if Start ==0set Start to 1If move == 0set 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 0Activate endifendifend 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 + .001set move to move + 1 ;repeats steps if move > 768 TopPlatRef.Enable ; Collision box at top position of lift so player won't fall Enableplayercontrols endifendif endifendif endifEND ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 October 13, 2016 by Mktavish Link to comment Share on other sites More sharing options...
Mktavish Posted October 13, 2016 Share Posted October 13, 2016 (edited) 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 October 13, 2016 by Mktavish Link to comment Share on other sites More sharing options...
uhmattbravo Posted October 13, 2016 Share Posted October 13, 2016 (edited) 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 October 13, 2016 by uhmattbravo Link to comment Share on other sites More sharing options...
Andyno Posted October 13, 2016 Author Share Posted October 13, 2016 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/?5wv277g5i4lagqeThe testing cell is aaTestElevator. Link to comment Share on other sites More sharing options...
Deleted1205226User Posted October 13, 2016 Share Posted October 13, 2016 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 More sharing options...
Mktavish Posted October 13, 2016 Share Posted October 13, 2016 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 More sharing options...
Mktavish Posted October 13, 2016 Share Posted October 13, 2016 (edited) 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 PlayerPosZref LiftPosZref LiftSoundPosZref LiftSoundPos-Zref LiftPosref PlayerPos-Zref LiftPos-Zfloat Startfloat Timerfloat Time begin onactivate set LiftPos to DDDLiftREF.getpos z if start ==0set Start to 1playsound DDDLiftSound2 1set Time to .001if player.hasperk DDDIsOnLiftPerkTEMPLATE ==1disableplayercontrols 1 0 0 0 0 0 0elseif player.hasperk DDDIsOnLiftPerkTEMPLATE ==0DDDTriggerDisableREF.disable 0 endifendifendif if start ==500set Start to 501playsound DDDLiftSound2 1set Time to .001if player.getpos z >= LiftPosif player.hasperk DDDIsOnLiftPerkTEMPLATE ==1disableplayercontrols 1 0 0 0 0 0 0elseif player.hasperk DDDIsOnLiftPerkTEMPLATE ==0DDDTriggerDisableREF.disable 0 endifendifendifendifend begin gamemode if start >0if start <500set PlayerPosZ to player.getpos z + 2set LiftPosZ to DDDLiftREF.getpos z + 2set LiftSoundPosZ to DDDLiftSoundREF2.getpos z + 2 if Timer < Timeset timer to timer + GetSecondsPassedelse if Start >0if Start <500DDDLiftREF.setpos z LiftPosZDDDLiftSoundREF2.setpos z LiftSoundPosZSet Time to Time + .001set Start to Start + 1if player.getpos z > LiftPosif player.hasperk DDDIsOnLiftPerkTEMPLATE ==1playerref.setpos z PlayerPosZ endifendifendifendifendifendifend begin gamemode if Start == 151set Start to 500enableplayercontrolsDDDLiftMarkerREF.enable 0DDDTriggerDisableREF.enable 0 endifend begin gamemode if Start >500DDDLiftMarkerREF.disable 0set PlayerPos-Z to player.getpos z - 2set LiftPos-Z to DDDLiftREF.getpos z - 2set LiftSoundPosZ to DDDLiftSoundREF2.getpos z - 2 if Timer < Timeset timer to timer + GetSecondsPassedelse if Start >500DDDLiftREF.setpos z LiftPos-ZDDDLiftSoundREF2.setpos z LiftSoundPos-ZSet Time to Time + .001set Start to Start + 1if player.getpos z > 8373 ;The height (z) of the original placement of the lift.if player.hasperk DDDIsOnLiftPerkTEMPLATE ==1playerref.setpos z PlayerPos-Z endifendifendifendifendifendifend begin gamemode if Start == 651set Start to 0enableplayercontrolsDDDTriggerDisableREF.enable 0 endifend 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 October 14, 2016 by Mktavish Link to comment Share on other sites More sharing options...
Mktavish Posted October 13, 2016 Share Posted October 13, 2016 (edited) 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 October 13, 2016 by Mktavish Link to comment Share on other sites More sharing options...
uhmattbravo Posted October 14, 2016 Share Posted October 14, 2016 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/?5wv277g5i4lagqeThe 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 More sharing options...
Mktavish Posted October 14, 2016 Share Posted October 14, 2016 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 More sharing options...
Recommended Posts