rompe320 Posted December 16, 2008 Share Posted December 16, 2008 I want to mod my arrows so they stick into objects better. For example, when u shoot an arrow into wood, it sticks there. I want to make it so i can shoot an enemy and stick him to the wall with an arrow. Also, i want my arrows to get stuck into any surface. how do i mod or script it so this happens? Link to comment Share on other sites More sharing options...
armageddon818 Posted December 16, 2008 Share Posted December 16, 2008 umm the arrows getting stuck in the wall is due to the material type of the wall/surface. So i dont think you want to go change everything in the entire game to wood....but thats how you would do that Link to comment Share on other sites More sharing options...
Vagrant0 Posted December 16, 2008 Share Posted December 16, 2008 I want to mod my arrows so they stick into objects better. For example, when u shoot an arrow into wood, it sticks there. I want to make it so i can shoot an enemy and stick him to the wall with an arrow. Also, i want my arrows to get stuck into any surface. how do i mod or script it so this happens?You cannot suspend anything with arrows. Once arrows hit something, they will either stick into that thing, or bounce off depending on what was hit. For arrows to stick into something, a number of changes are needed to any and all (as in individually) collision meshes related to that thing. Sorry to break it to you, but what you want either isn't possible in this game, or is totally impractical to even attempt. Link to comment Share on other sites More sharing options...
exanimis Posted December 16, 2008 Share Posted December 16, 2008 Sorry to break it to you, but what you want either isn't possible in this game, or is totally impractical to even attempt. I don't mean to disagree and come off sounding like an A hole but I believe almost anything is possible in this game. I do agree that it is impractical and would take a lot of changes to the original game. This post has brought up a few questions for me. I don't know anything about the physics of the game yet but I wander, How does the arrow know what to hit and weather it should stick or not? How does the arrow know how far to travel? There must be something in the game that tells the arrow that the goblin is all the way on the other side of the cavern. If that could be moved, placed against a wall for example, would the arrow know to stay there? If the physics of the goblin are scripted to collide and stick to the physics of the wall when the arrow hits, could that be a work around? just asking a few questions! Link to comment Share on other sites More sharing options...
Vagrant0 Posted December 17, 2008 Share Posted December 17, 2008 Sorry to break it to you, but what you want either isn't possible in this game, or is totally impractical to even attempt. I don't mean to disagree and come off sounding like an A hole but I believe almost anything is possible in this game. I do agree that it is impractical and would take a lot of changes to the original game. This post has brought up a few questions for me. I don't know anything about the physics of the game yet but I wander, How does the arrow know what to hit and weather it should stick or not? How does the arrow know how far to travel? There must be something in the game that tells the arrow that the goblin is all the way on the other side of the cavern. If that could be moved, placed against a wall for example, would the arrow know to stay there? If the physics of the goblin are scripted to collide and stick to the physics of the wall when the arrow hits, could that be a work around? just asking a few questions!First, the arrow itself has no physical properties as long as it remains stuck in the wall. In a sense, it is without collision, which is why you can shoot a bunch of arrows into the seat of a chair, and sit down without falling off or needing a trip to the proctoligist. An arrow in flight does have physical properties, and behaves like any other inventory object, but once it sticks into something, it has most of those physical properties turned off. This is why you can stack arrows on the floor, activate them, or even catch them in flight, but cannot use them to suspend a sword over a doorway. The depth that an arrow sticks into something is determined by where the havok node of the arrow is. If you move the node, the point where it sticks is changed. Moving the node also affects how the arrow flies, since it changes the center of gravity of the arrow. When the arrow hits the collision mesh of another object, it checks if that mesh is configured to hold onto the arrow, or if the arrow will bounce off. Once it hits a mesh that is configured to hold the arrow, it becomes locked in place in relation to the collision surface of that mesh. If the game does not detect the collision, the arrow will pass harmlessly through, until it hits something else. The distance the arrow travels is determined by the weight and speed of the arrow, along with the normal gravity and friction settings of the game. The arrow is directed based on your position and rotation (left/right and up/down). The arrows of NPCs are aimed in a very similar way, internally. Once an arrow hits something, it cannot be moved unless the mesh it first struck is moved. For the arrow to affect anything, there needs to be a collision detection for it to happen. Although, it may seem like the desired effect could be achieved with a combination of pushactoraway, setrigidbodymass, and scripting to make the affected target remain in the same position, the reality is that the game doesn't allow this. First, pushactoraway requires 2 things, the pusher, and the pushee. The pushee is the easy part, it's the target struck by the arrow. The Pusher however is not, since the arrow does not have an ownership until it has been added into the inventory of the target, and, since the idea was to have this apply to all arrows, the player would not always be the one making the shot. Second, is yet another collision detection problem. Although the game may be able to detect that an arrow has struck something, and may, to a limited extent, determine where on that thing, if an NPC, the arrow struck, but that is about all there is. When you shoot an arrow at a wall, there is nothing detectible through scripting to determine where it struck the wall, and unless that wall has been specifically designed, and scripted to have a trigger area, there won't even be a record of anything hitting that wall. Scripts cannot be run on statics. Arrows don't actually stick into things so much as the game detects that one collision mesh has passed into another collision mesh, determines that one of the meshes belongs to an arrow object, determines that the other mesh is designed to not reflect that projectile back, and then turns off the collision of the arrow. So, because that wall cannot actually detect that anything has collided with it from a scripting standpoint, and because the same is true for whatever is now being sent backward from the scripted arrow, that body will not know when to come to rest, and will either stop short, or bounce off that wall due to the ragdoll effect that pushactoraway causes. Additionally, since the distance that you would want to push each actor would be different, and there is no way to determine how far away an object is from a static behind, any method or number used to decide how much to push that actor, or at what point to lock the actor's position, would be wrong. I said this request was either impossible, or impractical since what is wanted specifically may not have been totally conveyed. Regardless, you can probably do a search on the times I've said that something was impossible around here, and most of the time I've either been right, or had several conditions applied defining specifically what part of that idea is impossible. Regardless, when I say that something cannot be done, I am talking about the here and now, as far as anything currently available can do it. Now if you really want to go to lengths considderably well beyond anything sane or practical, to create something like this, for a very limited instance, just to prove me wrong, you're wasting your time. Since the question is raised in a generic, playable setting, the answer I gave, is the one that it is. Any attempt to specifically design a situation to do what was suggested, would be an entirely different matter, but still totally impractical. And I'm not trying to pull some "Holier Than Thou" thing with that statement. I'm human, and can make mistakes, but for the most part, I'm usually right to some extent on modding Oblivion. I've certainly played around with enough of the engine, if only to see what new things I can play around with, so have some idea what I'm talking about when I say that something likely cannot be done within the game. And, depending on how you enterpret that statement, it does not cover OBSE or similar outside programs which manipulate the data of the game. But for the sake of argument, I usually include OBSE functions as possibilities when figuring out if something can or cannot be done. The game has come a long way, and many things have been done, but others simply cannot be done without totally changing the game. The argument has always been from a normal modding standpoint. I'm certain that if you cracked open some of the hard coding, or made adjustments to the base game code, many things can be done that would otherwise be impossible, but that is beyond the scope of modding, and well beyond the capability of most people. Link to comment Share on other sites More sharing options...
exanimis Posted December 17, 2008 Share Posted December 17, 2008 I wasn't trying to be disagreeable VagrantO, I just have an unusual way of looking at things. I do believe that you know much more about the game and the CS than I and that is why I ask questions. Your posts are informative and I often read a post only because you have responded to it. Once again I thank you for the information. Whenever I hear or see something and everyone says it's imposable, I have the bad habit of looking for a way around what others say. I look for other avenues that others might not have thought of. I have no plans to try and make this into a mod, I really don't have an understanding of scripting that would allow me to even consider the possibilities. I just start thinking about ways that something could be done instead of just saying it can't be done. I'm sure that the physics of every static object in the game would have to be changed but I couldn't help but ask about the possibility of changing the physics of the arrow or the creature to react with the wall. No offense was intended. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.