BadJeanBon
-
Posts
5 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by BadJeanBon
-
-
Doesn't work , when i attach this script to a box:
function Script:Start()
mySurface = self.entity:GetSurface(0)
System:Print(mySurface:CountVertices())
end
I get this error at line 2:
2 : attempt to call method 'GetSurface' (a nil value)
and the script stop with a requester.
-
Thanks for your reply Genebris
But I did test it, and it doesn't seem to work straight from the script attached. I guess I could load the model from the main.lua so I could declare it global and access it on a private script... but that wasn't my goal.
I was just curious to know if it could done, that is, to attach a script to a model entity and to use it to animate the vertex of an object for exemple ... I read the forum, and it seem that lua script only access the entity...It's ok... I was just asking, as a beginner , to be sure I wasn't missing something simple here...
Thanks again for your answer....
-
Hi ! I just want to know if it is possible to have acces the Model method in a lua script that has been attached to a model in the scene editor.
I wanna do something like
my_model = tolua.cast(self.entity , "Model")
my_surface = my_model:GetSurface(0)
I want a script that I can attach to any model in a map scene...
Thanks.
-
I perform a global variable dump in lua.
How do you do that ??
Model:CountSurfaces always return 1 ?
in Leadwerks Engine Bug Reports
Posted
Oops I'm sorry....
It's my mistake....
Just Ignore and delete my Post Please....