script for point cache

Thats really great, it works perfectly. I put the script on a ball, and removed it from all the peds. That script is now controlling the walk/idle of 10 peds perfectly.

Thanks you very much. I cant seem to get a 300k zip file uploaded on here for you to see, dont know why?

Here is the code;

MyArray = $Ped* as array

for i = 1 to MyArray.count do
(
t0 = f-1
t1 = f
p0 = at time t0 myarray.pos
p1 = at time t1 myarray.pos

if p0==p1 then WM3_MC_SetValue myarray.morpher 1 0.0

else WM3_MC_SetValue myarray*.morpher 1 100.0*
)

So all that is left know is getting the transition in the morpher to be over 5/6 frames, not “on/Off”

Thanks again.

Probably something added on to the else WM3_MC_SetValue myarray*.morpher 1 100.0 line.*

Look into controllers and keyframes so that you can set a key at frame t (with t being the current frame) with a value of 0.0 and then at frame [t + 6] add a keyframe with a value of 100.


MyArray = $Ped* as array

for i = 1 to MyArray.count do
(
     animate on (
          for t in 0 to 100 by 5 do (
               at time t 
                    WM3_MC_SetValue MyArray[i].morpher 1 t   -- the t variable is the frame time (0,5,10,15...100)
          )
     )

)

I have no idea what the variable f is or anything so your code doesn’t make any sense to me.

but try something like the above. I just can’t decipher this without some of the variable information.

Sorry Colin, the variables are just the pre-set ones in the script controller dialog.

f = frames
t = ticks
s = seconds
nt = norm time

I shall give your new script a go right now, thanks for your input.

Stupid question, but where would you put this script, or how would you have it running in a scene. I’m sure my way is not the best/right!!

M