Kissimurra Posted August 5, 2005 Share Posted August 5, 2005 I have made a mod that ads a portable Sarcophagus / Coffin to the game, but I have a problem that occurs when you drop it. The Coffin is an activator, and a bed, It can be picked up. ( then it transforms into a misc object in your inventory and goes back to an activator when dropped) The problem is that when you drop the coffin on the ground/floor it sinks into the ground so that only half the coffin is above ground. Is this something that a script can fix or do you need to change it in 3Ds Max? Is it something in this script that I can change so that the Coffin doesnt sink into the ground? begin script_coffinplace short OnPCDrop if ( OnPCDrop == 1 ) Disable; PlaceAtPC, "Coffin", 1, 64, 0 PlaceAtPC, "Coffin", 1, 0, 0 Set OnPCDrop to 0 endifend script_coffinplace Im a total noob at scripting, but perhaps these lines can change the placment of the coffin? PlaceAtPC, "Coffin", 1, 64, 0 PlaceAtPC, "Coffin", 1, 0, 0 Link to comment Share on other sites More sharing options...
Kissimurra Posted August 6, 2005 Author Share Posted August 6, 2005 I really wish wookie were here :P Link to comment Share on other sites More sharing options...
Morgoth Posted August 6, 2005 Share Posted August 6, 2005 I'm only guessing here, and don't have the Help file of the TESCS at hand, but the problem is probably this: When you place an item in the game world using a script, your specified coordinates are applied to that point of the object where the modelling programme had the point of origin. That means if the point of origin was in the middle of the object, and your specified coordinates are exactly over the ground, the lower half of the object is "sunken" into the ground.One way to solve this would be to modify the model (but that is unnecessary, and rotating the object would become a problem) - the other and easier way would be to simply increase the z-coordinate of the location where you want the object to be placed (the new z-coordinate of course depends on the height of the object - if the coffin stands upright and is, say, 200 units tall, then the z-coordinate should be 100). Link to comment Share on other sites More sharing options...
Kissimurra Posted August 6, 2005 Author Share Posted August 6, 2005 Oh, okay. Thanks for your help! So witch one of these is the Z coordinate? 64? PlaceAtPC, "Coffin", 1, 64, 0 PlaceAtPC, "Coffin", 1, 0, 0 Link to comment Share on other sites More sharing options...
ThetaOrionis01 Posted August 7, 2005 Share Posted August 7, 2005 It should be the 0 at the end. Usually coordinates are given as x, y, z, zrot (rotation) Link to comment Share on other sites More sharing options...
Kissimurra Posted August 7, 2005 Author Share Posted August 7, 2005 Okay, but how do I make the Coffin not to sink through the ground/floor? can I change something in the script or do I need to add some new lines to change the Z-coordinate? Link to comment Share on other sites More sharing options...
Morgoth Posted August 7, 2005 Share Posted August 7, 2005 Just replace the current value with a higher one - which exact value depends on the height of your object. Try half of its total height, i.e. if the object is 64 units high, replace the the 0 with a 32, if it is 200 units high, replace the 0 with a 100 etc. Link to comment Share on other sites More sharing options...
Kissimurra Posted August 10, 2005 Author Share Posted August 10, 2005 PlaceAtPC, "Coffin", 1, 64, 0 PlaceAtPC, "Coffin", 1, 0, 0 none of those values changes the Z coordinate so it wont help to change them, The values are these:"Coffin", 1, 64, 0 = ObjectID, count, distance, direction I need a new script to change the Z coordinate. Link to comment Share on other sites More sharing options...
ThetaOrionis01 Posted August 10, 2005 Share Posted August 10, 2005 Hmm... I'm not sure if this would work - it might be a bit cumbersome - but what you could try is place an invisible 'pseudo-coffin' first, then get the coordinates of that, and use PlaceItem to place the real coffin? First step - PlaceAtPC 'invisible_coffin' Second step - get coordinates of the invisible coffin Third step - adjust those coordinates for height Fourth step - PlaceItem or PlaceItemCell "coffin" at those new coordinates Link to comment Share on other sites More sharing options...
Abramul Posted August 10, 2005 Share Posted August 10, 2005 or use coffin->move z # Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.