Jump to content

ScarPunk

Members
  • Content Count

    43
  • Joined

  • Last visited

Community Reputation

16 Good

About ScarPunk

  • Rank
    Advanced Member
  • Birthday 07/19/2000

Profile Information

  • Gender
    Male
  • Location
    France
  • Interests
    Coding / Modeling

Recent Profile Visitors

1,279 profile views
  1. Thanks i found my error it was Leadwerks::Widget::Button("", (this->window->GetWidth() / 2) + 100, 250, 100, 55, panel); TO Leadwerks::Widget::Button("", (this->window->GetWidth() / 2) + 100, 250, 100, 55, gui->GetBase());
  2. My favorite game engine !

  3. Having fun with leadwerks and c++ !

    1. Show previous comments  1 more
    2. 💎Yue💎

      💎Yue💎

      I don't have fun in C++, my computer is very old and compilation times are very long.

    3. tipforeveryone

      tipforeveryone

      yep c++ is awesome to me now

    4. gamecreator

      gamecreator

      I know Josh said most of the Leadwerks customers use Lua but it's nice to see my brethren here.  😀

  4. Making my own player movements

  5. Hello 😀 Today i am working on my player but i have some issue with the collision. I would like to shrink the default collision cylinder but have no clue how to make it. 1. No physics appear on player At first when i turn on display physics the default hitbox didn't appear. 2. Default hitbox appear I found in a topic that adding hit box could fix it, so a add a hit box (CSG cylinder) but the default one is still there ;(
  6. I was looking for the condition not for the print 🤦‍♂️ Thanks macklebee
  7. Hello every one ! So today i am making my third person code. In my code i need to compare the name of child i want and the name of each children(GetChildren()) but i have got this error. when i try to compare their name. CODE: function Script:GetChildByName(nameRequest) for i = 0 , self.entity:CountChildren() -1 do local ent = self.entity:GetChild(i) local entName = ent:GetKeyValue("name") if entName == nameRequest then System:Print(nameRequest + " has been found !") return ent end end return nil end
  8. ScarPunk

    toLua++

    I made an other project but same problem . error: (lua51.dll) Shooter.zip
  9. ScarPunk

    toLua++

    App.h luaCall.cpp luaCall.h main.cpp App.cpp luaCall.cpp glue.cpp glue.h luaCall.h luacommands.pkg
  10. ScarPunk

    toLua++

    Ok so i made a good glue code Code: source /* ** Lua binding: luacommands ** Generated automatically by tolua++-1.0.92 on 08/14/18 22:20:58. */ #ifndef __cplusplus #include "stdlib.h" #endif #include "string.h" #include "tolua++.h" #include "luaCall.h" /* Exported function */ TOLUA_API int tolua_luacommands_open (lua_State* tolua_S); #include "Leadwerks.h" using namespace Leadwerks; /* function to release collected object via destructor */ #ifdef __cplusplus static int tolua_collect_hello (lua_State* tolua_S) { hello* self = (hello*) tolua_tousertype(tolua_S,1,0); Mtolua_delete(self); return 0; } #endif /* function to register type */ static void tolua_reg_types (lua_State* tolua_S) { tolua_usertype(tolua_S,"hello"); } /* method: new of class hello */ #ifndef TOLUA_DISABLE_tolua_luacommands_hello_new00 static int tolua_luacommands_hello_new00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"hello",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { { hello* tolua_ret = (hello*) Mtolua_new((hello)()); tolua_pushusertype(tolua_S,(void*)tolua_ret,"hello"); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE /* method: new_local of class hello */ #ifndef TOLUA_DISABLE_tolua_luacommands_hello_new00_local static int tolua_luacommands_hello_new00_local(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertable(tolua_S,1,"hello",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { { hello* tolua_ret = (hello*) Mtolua_new((hello)()); tolua_pushusertype(tolua_S,(void*)tolua_ret,"hello"); tolua_register_gc(tolua_S,lua_gettop(tolua_S)); } } return 1; #ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE /* method: SayHello of class hello */ #ifndef TOLUA_DISABLE_tolua_luacommands_hello_SayHello00 static int tolua_luacommands_hello_SayHello00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_isusertype(tolua_S,1,"hello",0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { hello* self = (hello*) tolua_tousertype(tolua_S,1,0); #ifndef TOLUA_RELEASE if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SayHello'", NULL); #endif { self->SayHello(); } } return 0; #ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'SayHello'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE /* function: import */ #ifndef TOLUA_DISABLE_tolua_luacommands_import00 static int tolua_luacommands_import00(lua_State* tolua_S) { #ifndef TOLUA_RELEASE tolua_Error tolua_err; if ( !tolua_iscppstring(tolua_S,1,0,&tolua_err) || !tolua_isnoobj(tolua_S,2,&tolua_err) ) goto tolua_lerror; else #endif { const std::string path = ((const std::string) tolua_tocppstring(tolua_S,1,0)); { bool tolua_ret = (bool) import(path); tolua_pushboolean(tolua_S,(bool)tolua_ret); tolua_pushcppstring(tolua_S,(const char*)path); } } return 2; #ifndef TOLUA_RELEASE tolua_lerror: tolua_error(tolua_S,"#ferror in function 'import'.",&tolua_err); return 0; #endif } #endif //#ifndef TOLUA_DISABLE /* Open function */ TOLUA_API int tolua_luacommands_open (lua_State* tolua_S) { tolua_open(tolua_S); tolua_reg_types(tolua_S); tolua_module(tolua_S,NULL,0); tolua_beginmodule(tolua_S,NULL); #ifdef __cplusplus tolua_cclass(tolua_S,"hello","hello","",tolua_collect_hello); #else tolua_cclass(tolua_S,"hello","hello","",NULL); #endif tolua_beginmodule(tolua_S,"hello"); tolua_function(tolua_S,"new",tolua_luacommands_hello_new00); tolua_function(tolua_S,"new_local",tolua_luacommands_hello_new00_local); tolua_function(tolua_S,".call",tolua_luacommands_hello_new00_local); tolua_function(tolua_S,"SayHello",tolua_luacommands_hello_SayHello00); tolua_endmodule(tolua_S); tolua_function(tolua_S,"import",tolua_luacommands_import00); tolua_endmodule(tolua_S); return 1; } #if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501 TOLUA_API int luaopen_luacommands (lua_State* tolua_S) { return tolua_luacommands_open(tolua_S); }; #endif Header /* ** Lua binding: luacommands ** Generated automatically by tolua++-1.0.92 on 08/14/18 22:20:58. */ #include "Leadwerks.h" using namespace Leadwerks; /* Exported function */ TOLUA_API int tolua_luacommands_open (lua_State* tolua_S); Problem: but now i have a new problem with lua when i am loading the map.
  11. An animation window like in unity can be cool (head swinging than i need to do with for loop)
  12. ScarPunk

    toLua++

    A ok i did this command tolua++ -o LC_luaCall luaCall.cpp
  13. ScarPunk

    toLua++

    I don't know what to do with the pkg file $#include "Leadwerks.h" $using namespace Leadwerks; class hello { hello(); void SayHello(); }; bool import(const std::string& path);
  14. ScarPunk

    toLua++

    I don't know it just crashing and doesn't show where it crash Console: error ×
×
×
  • Create New...