The Tool I'm creating is...

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Hi Peteroid.
I don't gat a Lua error now when I start AS 5.6 but....the PC tool icon has a question mark with a red cross through it.....and when I click the icon I get this Lua error:


Image

Cheers
D.K
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Post by Peteroid »

DK wrote:Hi Peteroid.
I don't gat a Lua error now when I start AS 5.6 but....the PC tool icon has a question mark with a red cross through it.....and when I click the icon I get this Lua error:


Image

Cheers
D.K
Hey! Progress... ok let me look at it...
[==Peter==]
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Post by Peteroid »

OK, new one ready for downloading.

I think I know the problem with the icon. Do ths with the new one:

Be sure to change the name of the file 'pao_point_camera_AS5.lau' to 'pao_point_camera.lua' before putting it in 'tool'. You also MUST get rid of the old 'pao_point_camera_AS5.lua' if it is still in 'tool'.

Also be sure 'pao_camera_point.png' and 'pao_camera_point_large.png' are in 'tools' as well.

We are close... I see a pattern and I fixed it in all places the same type of error likely would come up.

So let's see about this one... :)
[==Peter==]
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Sure are getting close :)

Icon is back but when I clicked "Execute" got this :

Image

One thing about operation. I imagine you highlight the layer you want the camera to point at then run execute?

Cheers
D.K
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Post by Peteroid »

DK wrote:Sure are getting close :)

Icon is back but when I clicked "Execute" got this :

Image

One thing about operation. I imagine you highlight the layer you want the camera to point at then run execute?

Cheers
D.K
Correct... you just select a layer in the Layer area and that is the one the camera follows.

Ok, let me look at this one. Every time its a new error it means we are making progress... :)
[==Peter==]
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Post by Peteroid »

OK. I actually saw no reason that error should be happening. But I did make a change that might help. There is a new download version, but I don't have high hopes for it.

If this one works, cool. If not, I have to go to bed (it is almost 2AM here). But please post the results so I can look in the morning.

Also, if anyone else sees this, has version 5, and knows scripting, please feel free to look and see what I might have done wrong (assuming it is still not working).

Also, you might try rebooting... not sure if all these different misfires might have confused your computer... lol

night for now...
[==Peter==]
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

IT WORKED!!!!!!!! You have a AS V5 working version of Point Camera!
Fantastic Petroid!!!!!

Great work mate! So sorry to keep you up.

(I wonder if this would work as it is in AS v6?)

Well done!
Cheers
D.K
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

What's great about this script is that you can run it pointing at the target layer, then go in and manually adjust the camera at any frame so it does'nt point at the layer then just run the script again and it updates the camera shot so it's pointing at the layer again.....great for tweaking camera moves.

Many thanks for this script again Peteroid.
Cheers
D.K
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Post by jahnocli »

Peteroid wrote:Every time its a new error it means we are making progress
That's a programmer talking!
You can't have everything. Where would you put it?
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Post by Peteroid »

DK wrote:IT WORKED!!!!!!!! You have a AS V5 working version of Point Camera!
Fantastic Petroid!!!!!

Great work mate! So sorry to keep you up.

(I wonder if this would work as it is in AS v6?)

Well done!
Cheers
D.K
COOL! And of course I learned a bunch too... :)
Last edited by Peteroid on Wed Sep 22, 2010 4:27 pm, edited 1 time in total.
[==Peter==]
User avatar
Peteroid
Posts: 162
Joined: Thu Aug 12, 2010 3:57 am
Location: las vegas, NV
Contact:

Post by Peteroid »

THERE IS A NEW VERSION (version 2)

I had forgotten to take into account the Origin of the Layer. It will now Point directly at the Origin of the Layer (previously it pointed at the Layer as if Origin = (0,0) )

New download includes versions for both ASP7 and AS5 (version 2 untested by me). I don't know if it works for AS6 since I can't test this.

I think I may add a check box... if checked it uses the Origin offset, if not it doesn't. That way one can be independent of the Origin value or not! :)

Still, the best 'tricks' will be accomplished by using an invisible 'focus point' layer that one places where the camera is to point. In this case using Origin = (0,0) makes sense, which means the Origin has no effect.

HOWEVER:

Since the Origin of a Layer can be animated, one could create an invisible 'focus point' layer to follow... then by animating the 'focus point' layer's Origin it moves with respect to that while in general focusing on the Layer.

An example. Create a 'focus point' layer, and attach it to a character at belt level. Now animate the origin by having it increase in Y till it is at head level. What you get is the camera following the character wherever it goes, but the camera also pans from the belt to the head while doing this! Sort of a 'reference frame' in a 'reference frame'....
[==Peter==]
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Confirmed it works in AS5.

Cheers
D.K
User avatar
funksmaname
Posts: 3174
Joined: Tue May 29, 2007 11:31 am
Location: New Zealand

Post by funksmaname »

should this thread be closed and conversation regarding this tool migrated to the other thread? there's two threads about the same script going at the same time :P
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Post by DK »

Good idea.
I'll repost there.

Cheers
D.K
Post Reply