Alienhead Posted April 30 Share Posted April 30 ( LUA ) Seems to be missing - self.sprite_ledgemarker:SetViewMode(SPRITEVIEW_BILLBOARD) Quote I'm only happy when I'm coding, I'm only coding when I'm happy. Link to comment Share on other sites More sharing options...
Josh Posted April 30 Share Posted April 30 It seems like all that stuff is in there: void Sprite::BindClass(sol::state* L) { L->set("SPRITEVIEW_DEFAULT", SPRITEVIEW_DEFAULT); L->set("SPRITEVIEW_BILLBOARD", SPRITEVIEW_BILLBOARD); L->set("SPRITEVIEW_XROTATION", SPRITEVIEW_XROTATION); L->set("SPRITEVIEW_YROTATION", SPRITEVIEW_YROTATION); L->set("SPRITEVIEW_ZROTATION", SPRITEVIEW_ZROTATION); L->new_usertype<Sprite> ( "SpriteClass", sol::base_classes, sol::bases<Entity>(), sol::meta_function::index, &Entity::dynamic_get, sol::meta_function::new_index, &Entity::dynamic_set, "SetClipRegion", &Sprite::SetClipRegion, "size", sol::property([](Sprite& s) { return s.size; }), "mesh", sol::property([](Sprite& s) { return s.mesh; }), "SetViewMode", &SetViewMode, "SetText", [](Sprite& s, std::string t) { s.SetText(t); } How is sprite_ledgemarker being created? Are you sure the variable is a sprite? I noticed the sprite casting is missing, so I am adding it now. You may need to do this, once it is updated: local sprite = Sprite(entity) sprite:SetViewMode() Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Solution Josh Posted April 30 Solution Share Posted April 30 I am going to mark this as solved. I think you just need to cast the entity to a sprite. Let me know if there is still a problem when you get back. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.