Jump to content

ScarPunk

Members
  • Content Count

    42
  • Joined

  • Last visited

Community Reputation

12 Good

About ScarPunk

  • Rank
    Advanced Member
  • Birthday 07/19/2000

Profile Information

  • Gender
    Male
  • Location
    France
  • Interests
    Coding / Modeling

Recent Profile Visitors

426 profile views
  1. Making my own player movements

  2. 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 ;(
  3. ScarPunk

    String compare problem

    I was looking for the condition not for the print đŸ€Šâ€â™‚ïž Thanks macklebee
  4. ScarPunk

    String compare problem

    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
  5. ScarPunk

    toLua++

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

    toLua++

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

    toLua++

    New error ;(
  8. 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.
  9. An animation window like in unity can be cool (head swinging than i need to do with for loop)
  10. ScarPunk

    toLua++

    A ok i did this command tolua++ -o LC_luaCall luaCall.cpp
  11. 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);
  12. ScarPunk

    toLua++

    I don't know it just crashing and doesn't show where it crash Console: error ×
  13. ScarPunk

    toLua++

    I got that Millecenttreize.debug.exe' (Win32) : ChargĂ© 'C:\Windows\SysWOW64\dcomp.dll'. Impossible de trouver ou d'ouvrir le fichier PDB. Le thread 0xe48 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x2a8c s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x1540 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x2be8 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x46f4 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x3b48 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x27b0 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x1ef4 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x2fd4 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x2920 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x4380 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0xacc s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x1df8 s'est arrĂȘtĂ© avec le code 1 (0x1). Le thread 0x33fc s'est arrĂȘtĂ© avec le code 1 (0x1). Detected memory leaks! Dumping objects -> {536} normal block at 0x129FCA58, 316 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {530} normal block at 0x128C30F0, 496 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {529} normal block at 0x1292AD88, 240 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {515} normal block at 0x129150C0, 1504 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {509} normal block at 0x128EB4D8, 2296 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {508} normal block at 0x129283B0, 1040 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {488} normal block at 0x129FC8F0, 316 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {482} normal block at 0x128C3318, 496 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {481} normal block at 0x0E329970, 240 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {433} normal block at 0x12839BF8, 304 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {427} normal block at 0x128C2EC8, 496 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {426} normal block at 0x0E32AAC8, 240 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {412} normal block at 0x128B64D8, 2272 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {406} normal block at 0x128B52F8, 4528 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {405} normal block at 0x128B1938, 2032 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {380} normal block at 0x1289D420, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {379} normal block at 0x1289C1E0, 4624 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {368} normal block at 0x128973B8, 7984 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {367} normal block at 0x1288BBA0, 3568 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {213} normal block at 0x127F7C28, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {212} normal block at 0x127EBB98, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {206} normal block at 0x127F3BF8, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {205} normal block at 0x127EFBC8, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {193} normal block at 0x127D6700, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {190} normal block at 0x122CE5C0, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {189} normal block at 0x122CA590, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {188} normal block at 0x122C6560, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {186} normal block at 0x122C2530, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {185} normal block at 0x122BE500, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {184} normal block at 0x122BA4D0, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {183} normal block at 0x122B2420, 32896 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {182} normal block at 0x122A2370, 65664 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {181} normal block at 0x1229A2C0, 32896 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {180} normal block at 0x12292210, 32896 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {179} normal block at 0x1228A160, 32896 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {178} normal block at 0x12281F30, 33280 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {177} normal block at 0x12269EC0, 98368 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {171} normal block at 0x121C11D0, 8 bytes long. Data: <X % { > 58 C7 25 12 80 7B 8E 01 {165} normal block at 0x121C10F0, 8 bytes long. Data: <d % { > 64 C6 25 12 80 7B 8E 01 {164} normal block at 0x1225C5A0, 2720 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {163} normal block at 0x1225C420, 336 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {157} normal block at 0x04EF4998, 760 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {143} normal block at 0x04EF44F0, 1144 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {142} normal block at 0x078C9040, 528 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {125} normal block at 0x0E031F28, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {124} normal block at 0x0E02DEF8, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {123} normal block at 0x0E029EC8, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {122} normal block at 0x0E025E98, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {116} normal block at 0x0E021E68, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {115} normal block at 0x0E01DE38, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {114} normal block at 0x0E019E08, 16384 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {113} normal block at 0x0E011D58, 32896 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {112} normal block at 0x0E001CA8, 65664 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {111} normal block at 0x0DFF9BF8, 32896 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {110} normal block at 0x0DFF1B48, 32896 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {109} normal block at 0x078BF800, 32896 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {108} normal block at 0x0DFE9918, 33280 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {107} normal block at 0x0DFD18A8, 98368 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {101} normal block at 0x04EDA280, 8 bytes long. Data: < { > 98 E5 91 07 80 7B 8E 01 {95} normal block at 0x04EDA050, 8 bytes long. Data: < { > A4 E4 91 07 80 7B 8E 01 {94} normal block at 0x0791E3F8, 2720 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 {92} normal block at 0x078A6F60, 336 bytes long. Data: <cccccccccccccccc> 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 Object dump complete. Le programme '[4248] Millecenttreize.debug.exe' s'est arrĂȘtĂ© avec le code 1 (0x1). Lua code: function Script:Start() speaker = hello:new() speaker:SayHello() end
  14. ScarPunk

    toLua++

    Hello đŸ–ïž Question: What i need to do with the luacommand generated ? i used tolua++ after and i got a cpp file so i made a header and i included this glue file into my project Code: Main.cpp #include "App.h" #include "Functions/LC_luaCall.h" //glue file using namespace Leadwerks; int main(int argc,const char *argv[]) { if (Interpreter::L == NULL) // lua ( Interpreter::L signify what ?) Interpreter::Reset(); tolua_luaCall_open(Interpreter::L);//end lua App application = App(); if (application.Start()) { while (application.Loop()) {}; } } Problem: When i am creating an object in lua from my c++ code the program crash !
×