Demeggy Posted May 9, 2011 Share Posted May 9, 2011 Whats the best way to get a movable static to move seemlessly? I want a rock to move from markerA to markerB and back again in a continuous loop, and the only way I can seem to do it is to write aup a script that after 0.25 seconds, forces it to move to markerApoint1 (a midpoint for the transition), increment a counter, then move to markerB and reverse. It just seems glitchy and erratic this way. Any ideas appreciated :) Demeggy Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted May 9, 2011 Share Posted May 9, 2011 How about a "rock armor" that a dummy NPC wears, and you give him a patrol package to move wherever you want him to go? Link to comment Share on other sites More sharing options...
Demeggy Posted May 9, 2011 Author Share Posted May 9, 2011 How about a "rock armor" that a dummy NPC wears, and you give him a patrol package to move wherever you want him to go? Clever idea, but wouldnt fit my purposes unfortunately, a to b is vertical :( Link to comment Share on other sites More sharing options...
davidlallen Posted May 9, 2011 Share Posted May 9, 2011 I have done this in The Most Dangerous Game (link below) for a moving ore cart. It moves some distance, stops, and then returns. I did this by computing how far I wanted it to move in 1/30 of a second (say, one frame time) and then using a gamemode block which calls "setpos". For example, to move 10 distance units in 10 seconds, move 0.033 distance units per 1/30 of a second. This worked OK for me, but when the object is moving the player can pass through it. So it is not perfect. Link to comment Share on other sites More sharing options...
Demeggy Posted May 9, 2011 Author Share Posted May 9, 2011 I have done this in The Most Dangerous Game (link below) for a moving ore cart. It moves some distance, stops, and then returns. I did this by computing how far I wanted it to move in 1/30 of a second (say, one frame time) and then using a gamemode block which calls "setpos". For example, to move 10 distance units in 10 seconds, move 0.033 distance units per 1/30 of a second. This worked OK for me, but when the object is moving the player can pass through it. So it is not perfect. Sounds interesting, will experiment with that and get back to you. Luckily, the player isnt within touching reach of this object. In what context did you use the setpos? Link to comment Share on other sites More sharing options...
davidlallen Posted May 9, 2011 Share Posted May 9, 2011 I am not sure what you mean by "in what context". It was a game mode block on the object moving, with a static trigger box to start it when the player entered the area. Link to comment Share on other sites More sharing options...
Recommended Posts