andersonsmith969 Posted April 12, 2012 Share Posted April 12, 2012 When trying to move a mesh, like with an elevator using a script, vanilla mesh collisions don't move with the mesh as they are moving (like using the setpos command). Does anybody know how to make/use/reconfigure a nif's settings so that collision moves with it? I know that certain meshes in mods like Nehrim are able to do this, but I'm not sure what the settings are to make this happen. Thanks! Link to comment Share on other sites More sharing options...
Sazerra05 Posted April 12, 2012 Share Posted April 12, 2012 (edited) sscn myLiftScript float curpos float endpos short vatorStatus begin onactivate player if vatorStatus == 0 set endpos to getpos z - 634 set vatorStatus to 3 message "Going Down!" elseif vatorStatus == 1 || vatorStatus == 3 message "The Lift is in motion!" elseif vatorStatus == 2 set endpos to getpos z + 634 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 * 0.75) 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 * 0.75) setpos z curpos player.resetfalldamagetimer else ;FINAL DOWN POSITION - SET EXACT Z set vatorStatus to 0 setpos z 1909 endif endif end Edited April 12, 2012 by Sazerra05 Link to comment Share on other sites More sharing options...
andersonsmith969 Posted April 20, 2012 Author Share Posted April 20, 2012 I'm using a script that looks exactly like this. The script isn't the problem, it's the NIF settings of the mesh you're using for the elevator. But are there any meshes you know of that work with this script? Link to comment Share on other sites More sharing options...
QQuix Posted April 20, 2012 Share Posted April 20, 2012 ARGate01: The collision part moves with the visual part. I was told that it is because it is an animated mesh. This mesh will work as an elevator but only up to a speed limit (not very high)Up to that limit, you setpos the mesh in the script phase of the frame and the engine lifts the player/NPCs , keeping then on the platform. Over that limit, the platform will go up faster than the engine adjusts the characters and they will fall thru.Same thing going down: up to a certain speed it will look fine, too fast and the characters will be in free fall. One alternative, if you know how (I don't), is to do it with mesh animation instead of setpos. The game has elevators built this way. Link to comment Share on other sites More sharing options...
Recommended Posts