Data Realms Fan Forums
http://45.55.195.193/

Lua Error
http://45.55.195.193/viewtopic.php?f=73&t=15302
Page 1 of 1

Author:  Mind [ Thu Jun 11, 2009 1:49 am ]
Post subject:  Lua Error

What does this mean?

Image

Thanks :) The script is applies for particles

Author:  Duh102 [ Thu Jun 11, 2009 1:52 am ]
Post subject:  Re: Lua Error

I believe you're trying to put Vel (which is a Vector) into a function, when the function or whatever wants a number.

Author:  Mind [ Thu Jun 11, 2009 1:53 am ]
Post subject:  Re: Lua Error

Wierd thing is it works for actors, but not particles.

Author:  mail2345 [ Thu Jun 11, 2009 1:56 am ]
Post subject:  Re: Lua Error

You need to add either a .X or a .Y to choose which velocity you want.

Author:  robolee [ Thu Jun 11, 2009 4:20 pm ]
Post subject:  Re: Lua Error

Duh got it the wrong way round, you've put "Actor.Vel(number)" but it needs a vector, so "Actor.Vel(number, angle)" is what you need.

What you can do is "Actor.Vel.Magnitude = number"... I think, though I'm not sure if you can just directly alter the magnitude like that without setting the angle, try it, if it doesn't work then you need to do "Actor.Vel(number, Actor.RotAngle)".

Author:  Duh102 [ Thu Jun 11, 2009 4:29 pm ]
Post subject:  Re: Lua Error

robolee wrote:
Actor.Vel(number, angle)

Oh, Cortex vectors are (length, angle)? I thought they were (X, Y)...

Author:  piipu [ Thu Jun 11, 2009 5:41 pm ]
Post subject:  Re: Lua Error

They are (X,Y). Roboblee is wrong in everything he said. You probably need to use actor.Vel:SetMagnitude(insert magnitude here). Or actor.Vel = Vector(X,Y).

Author:  Grif [ Thu Jun 11, 2009 7:22 pm ]
Post subject:  Re: Lua Error

Confusion about polar coordinates versus cartesian.

But CC uses cartesian anyways.

Author:  Mind [ Thu Jun 11, 2009 8:04 pm ]
Post subject:  Re: Lua Error

But im using particles, and it gives me that error, but with actors, it doesnt. Mail said it worked fine for him, so ill just try and save it into a new lua file

Author:  robolee [ Sun Jun 14, 2009 3:46 pm ]
Post subject:  Re: Lua Error

Yeah, sorry guys I wasn't thinking right, it's Actor.Vel(X velocity, Y velocity) it's not just X,Y though as that would be a position and not a velocity. I was thinking in "real" physics terms (in which a velocity is given as the velocity and direction and not the components) and not game terms. I don't know ALL the lua functions and I was just guessing that "Actor.Vel.Magnitude = number" might work, though I did doubt it.

if I didn't get the variables for the funtion mixed up I would have basically said what piipu said, minus the correct function for setting magnitude.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/