BadPrenup Posted July 12, 2009 Share Posted July 12, 2009 I'm working on a mod and I have been having some problems with physics not working on items. I can't really go into detail as the mod is tightly under wraps but I can give you the basics. A. There is a large ramp that I am trying to roll a marble down.B. The ramp is far above the players head, so the player can't just use the grab key to put it on the ramp.C. The item itself is a direct copy of a pearl so I know it has proper physics.D.1. I created a spell that when you cast it, the marble is enabled at the top of the ramp. Even though there is no flat part for the marble to be stuck on, it refuses to move.D.2. I have tried putting it partially in the ramp, even in the air above the ramp to try and kick the physics in. That didn't work either.D.3. I modified the spell to simply move the marble to the correct spot from a platform that isn't visible to the player, but it still just sticks in one spot after it moves.D.4. If I disable collision, 'fly' up to the ramp and press the grab key (z), then go back down and enable collision it works fine. Of course I don't want the player to have to do that.E. I'm out of ideas, unless there is some special script to make it behave correctly I'm lost. Any help? Link to comment Share on other sites More sharing options...
Khet Posted July 12, 2009 Share Posted July 12, 2009 Physics aren't enabled on objects until the player or an actor interacts with it in some way. With this in mind I could pull open the CS, make a sword that floats in mid air but as soon as the player came too close to it (or any other actor) it would fall to the ground. Only real way to do this would allow the player to pick up said pearl, and plop it on the ramp themselves. Link to comment Share on other sites More sharing options...
BadPrenup Posted July 12, 2009 Author Share Posted July 12, 2009 Few Updates:I have since tried making the marble activate itself using a simple line that has marble.activate marbleI also tried using Reset3DState and that didn't work either. @Khet I see. I didn't expect a reply so quickly you guys are a lot faster then the fellows over at PES, so I didn't refresh the page before adding this quick edit. Would it work if I put a script on the marble like this work? (underscores represent tabs) scn marblescript short control begin onactivateif control != 3_set control to 3elseif control == 3_activateendifend This way the first time the marble is activated it does not go into the player's inventory but it is technically interacted with by the player. The second time and all other times it will be picked up as normal. This will work as far as I need it to, because the marble isn't used or even seen/interacted with by anything before it is moved for this spell. Link to comment Share on other sites More sharing options...
Khet Posted July 12, 2009 Share Posted July 12, 2009 First off, when posting a script use the [ code] [ /code] (remove the spaces) block. Secondly, I'm not entirely sure if this would work. Activating is not the save as interacting. However, if the player is close enough to activate it they are also close enough to Z grab, so why not hint at that? When I mentioned interacting above I meant either using the Z grab or bumping into it. HOWEVER, I do have one small idea, this might be a rather shoddy way to do this but in the end it's up to you. While playing Oblivion I'm sure you've notice that when you pick something up on a table, everything else moves, right? This is because the physics on those objects have activated, and they are either too high off a surface, or too 'low' and the collision detection is pushing them upwards. On simple set up would be have your pearl on the ramp, then an item below it within each (yet not too far from the pearl) that when the player picks it up, the pearl will have it's physics enabled and thus roll down the ramp. this might take some tweaking to get the position of the second object correct but with this method I don't see why it wouldn't be possible. Link to comment Share on other sites More sharing options...
BadPrenup Posted July 12, 2009 Author Share Posted July 12, 2009 Hmm... that could work. I don't know of anyway to have an object close enough for the player to grab. It's in the Sewers so the ceiling where the ramp starts is kind of really high up. I wonder if I could make a lever that would trigger a trap that in turn hits the marble. I'd have to rebuild the entire thing, or at the very least tweak it and make sure it works in testing before I submit it. Link to comment Share on other sites More sharing options...
BadPrenup Posted July 12, 2009 Author Share Posted July 12, 2009 Alright so I used a log trap to hit the marble to activate its physics, After a little bit of tweaking I think I can get it to work. Thanks for the help Khet, If I never talked to you I probably never would have figured it out. Kudos. Link to comment Share on other sites More sharing options...
Recommended Posts