...7FeEEeeEeeEeeeET!!! HAPPY YOU BE THERE!

And THANK YOU very much for your advices!

I know that see my "codes" must be like a very... amusing?

for the real scripters here so -->

Jaja... Well, it's true that all this can result a little confusing and maybe I should have explained better, so I think I going to put here part of the mail I sent to the great
LM where I explain my purpose and his response for I will be always
SO -->
SO -->
SO GrAteFuL!

...
HURRAY FOR THE
BEST CUSTOM SUPPORT IN THE WORLD!!!
Ramón López wrote: [...] Well, as you know (I think...), I have always wished the possibility to can change the way Moho treat Bones/Points interaction during animation works, you know, to can change between: bones deform points based on 0 frame points position or bones deform points based on current frame points position...
The case is that I really need something like this to can obtain the desired results and I've been treating to write an Embedded Script that copy current (cursor time) points position to frame 0 in real time, I mean, the script would transmit all the fAnimPos/fPos or AnimVec2 (I'm not sure yet...) info of the current frame to frame 0, all to can get frame 0 points position be always exactly the same that the position of that points in any other current frame... so bones be "deceived" and well, can "simulate" with it that the bone forces over the points change "dynamicaly" in time...
Of course, I know... all this seems like a madness, isn't? Well, but (if possible) that is precisely that I want to know before waste more time in the "scripting" works... Do you think that, if finally I could get the script works, something like this could work propertly? Or in the other hand (and as I afraid...) could result in a mess, bugged and unexpected animation results? [...]
And... :D LM wrote: [...] I think what you describe would be possible, but there is also one big problem.
First, to change the position at frame zero, you would do something like this:
Code: Select all
local pt = mesh:Point(id)
-- the next line copies the current position back to frame 0
pt:SetPos(pt.fAnimPos:GetValue(currentFrame), 0)
The skeleton would then work on the new point position. There is a slight problem: I'm not sure about the sequence of events. The skeleton might get applied before your script gets called. In that case, the skeleton wouldn't use the new value you set - it wouldn't know about it until the next frame. So, the skeleton might be running kind of "one frame behind".
The bigger problem is that you're over-writing the point positions at frame 0. So, when you do go back to frame zero, the points will be moved around in strange ways. To fix this, your script would need to save the original frame 0 positions, and restore them if the user ever went back to the real frame 0. This would take some work, but it seems like it could be possible.

THANK YOU! (again

) ...Well, I think this can clarify all the aspects, and I know that all this can sound like a little weird (I know...), but belive me if I say you that this is a very important and significant thing and the most actually for me at least...
Now the code that I have after I've received the esteemed LM help, I don't know if I'll have done something badly (thought I'm afraid yes...) but finally I have put it in the only way that I have could get no errors and "almost" get it works fine:
Code: Select all
function LayerScript(moho)
local frame = moho.frame
local mesh = moho:Mesh ()
local pointCount = mesh:CountPoints ()
if (mesh:CountPoints () < 1) or (moho.frame == 0) then
return
end
-------------------------------------------------------------
for i = 0, pointCount-1 do
local mPoint = mesh:Point (i)
pt = mPoint
end
pt:SetPos(pt.fAnimPos:GetValue(frame), 0)
end
And as I said... IT WORKS!

I have been experimenting (not sure yet, but might not have such a problem about the
"one frame behind" issue) and it's iNcReDiBLe GUYs!

But... ejem... of course only works for one point in the mesh

...So I have the same problem and dudes at this point...
Code: Select all
for i = 0, pointCount-1 do
local mPoint = mesh:Point (i)
pt = mPoint
end
This was part of another script that I've puted here to get some results cause without it the script give me an error... and seems that this code apply the changes over the last point of the mesh only, over the penultimate if I change pointCount-1 into pointCoun-2, and so... But seems not possible to me make the script works over ALL the points, so... Am I doing somethigng wrong? (I hope...) Or this is simple impossible to get in this way? I mean, if you get the value of several points how can be administrasted all this info, wouldn't be a mess? Uf... my head, is still the real mess

, jaja... Well, I going to stop here, but if someone have some idea, or clue or something, you know... I'd be INCREDIBLY grateful

...
THANK YOU for readme!
PS: Uf... Definitely my biggest post

Mmm... SORRY! (very much

)