Home   Help Search Login Register  

Author Topic: Movable charatcers?  (Read 570 times)

0 Members and 1 Guest are viewing this topic.

psyichic

  • Guest
Movable charatcers?
« on: 13 Nov 2004, 02:59:43 »
Is there any way to get a person to stick to an object? Like is it possible to make him stay at any point but while moving? without the person getting a clippy type of effect with them stopping for a second then popping back into the place? anyone know someonething like this?

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Movable charatcers?
« Reply #1 on: 13 Nov 2004, 03:13:46 »
as in, he will be running and not going anywhere?

put him on a setvelocity loop that sets it to [0,0,0] every .001 seconds

getpos will make him all clippy

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Movable charatcers?
« Reply #2 on: 13 Nov 2004, 12:02:00 »
I've used setPos loop to keep a loon in place without clipping.    Delay was ~0.001.

Anyway, setPos and setVelocity are your basic tools.   Beyond that its just a matter of experiment.
Plenty of reviewed ArmA missions for you to play

psyichic

  • Guest
Re:Movable charatcers?
« Reply #3 on: 13 Nov 2004, 12:34:51 »
Thats sounds oaky Oh and I mean the opposite so it will also work if the unit isnt running but he is moving like update his position to any certain unit?

EDIT:is it possible to setPos him to another person?
« Last Edit: 13 Nov 2004, 12:42:06 by psyichic »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Movable charatcers?
« Reply #4 on: 13 Nov 2004, 17:02:53 »
for the first question if you mean him sliding over to the other that would take a bit a geometry to find how fast he has to go in each direction and then setvelocity to that, but if you mean him just popping over to a guy it is very easy:
guy1 setpos getpos guy2
although this is likely to get clippy, so i would do this:
guy1 setpos [(getpos guy2 select 0) + 1,(getpos guy2 select 1),(getpos guy2 select 2)]
that would set him 1 meter to the east o the guy he is being setposed to

psyichic

  • Guest
Re:Movable charatcers?
« Reply #5 on: 13 Nov 2004, 19:34:54 »
Thanks oaky I will try a few of those ideas im just trying to get it as unclippy as possible. so whatever works I guess. Is there any way to increase the rate at which the object is placed again? Im guessing if it is made fast enough it could be almost unnoticable if the object is moving at lower speeds but it could eat up CPU power if made to fast. Any way to increase the getpos/setpos rate?

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Movable charatcers?
« Reply #6 on: 13 Nov 2004, 19:49:46 »
Put it all in a script like this:


#loop

guy1 setpos [(getpos guy2 select 0) + 1,(getpos guy2 select 1),(getpos guy2 select 2)]

~0.1

goto "loop"

That way it loops every 0.1 second or nearabouts.


Planck
I know a little about a lot, and a lot about a little.

psyichic

  • Guest
Re:Movable charatcers?
« Reply #7 on: 13 Nov 2004, 22:50:06 »
THanks much everyone sorry for the newbish questions oh and thanks for the code sample Planc. EDIT: one last thing I did try out a script somewhat like that a little modified but any script I use it seems that your Dir gets stuck in place when using the setPos to the object. You cant turn or if you can its not noticable becasue of the resetting function. Any way to counter it?
« Last Edit: 14 Nov 2004, 04:20:59 by psyichic »