Jump to content

Moving a movable static


Demeggy

Recommended Posts

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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...