
MexSource
Members-
Posts
132 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by MexSource
-
Thought about this :/ and yes i think minecraft running not extremely laggy because minecraft doesnt render any blocks that you can't see (you see it when you stuck in glowstone if the bug isn't fixed) But it should not be a second minecraft, it should be a puzzle game with block placement (puzzle game with voxel elements) Will try The list (forgot about that...) - Mex
-
Hello, I would like to create a cube but don't assign it to a variable like create unlimited, but i only found entity::copy... i have a cube that i want copied but it seems like i need somthing to copy it to. any solution? - Mex
-
ok then i will wait
-
ok, but is there a solution for the moment? Entity::Hide() is also now a function but i think it only hides the object and not disables it functions
-
Hello, I tried to find something for deactivating lights but no function (everything outdated in internet) so i tried using: light->SetRange(0 - 10); but i think i need to rerender the light? is that possible? - Mex
-
k thanks
-
You mean i will need to pay a little amount every year?
-
Hello, one simple question: do i need to buy a upgrade when 3.1 is out and i would buy 3.0? or only version 3 to version 4? or no need to buy again? //Edit: http://www.leadwerks.com/files/EULA.txt i read it and means: 'You may not create a 3D game or other application that is modifiable by script, programming, GUI interface or other [...]' that i am not allowed to create a level editor for my game? - Mex
-
Hmm you are right 'CreateDecal' isn't a function :/ is there any method to create decals? (Sure C++)
-
Will try this: C++: TMesh Surface::CreateDecal( const TVec3& pos, flt radius, int matrix = 0 ) const (http://www.leadwerks.com/werkspace/page/Documentation/le2/_/command-reference/meshes/createdecal-r305) tomorrow (should have searched better :/) - Mex
-
3 the trial for the moment
-
Nope searched for it but everything the search found, outdated or something similar, 6 threads nothing working :/ Pls help PS: i thougt it was C at the first look (but outdated :/)
-
Hello Community, I would like to create decals where i 'shoot' with mouse 1. But I only found: http://www.leadwerks.com/wiki/index.php?title=CreateDecal but there is no example for C++ and no syntax Anyone got a solution -Mex
-
Oh you're faster than i can edit my post Thank you (again)
-
Is there a function or are they displayed as entites? btw: Thank you so much everything now works -Mex Oh wait i could look myself too thanks for everything
-
One simple question: Can i get all boxes from the scene and store them?
-
(there's already a list :/ ) added this: int i = 0; list<Entity*> entList = world->entities; while(i < entList.size()){ System::Print("Entity loaded: " + entList.front()->GetKeyValue("name")); entList.pop_front(); i++; } I only get ''Entity loaded: " 3 times in console without an name :/ i hope its my last question -Mex
-
void MapLoader(Entity* entity, Object* extra){ ((App*)extra)->LoadMapEntity(entity); System::Print("load entity?"); } tried this in my maploader function no single 'load entity?' line in my log :/
-
will have a look at it tomorrow thanks -Mex //edit: added 'System::Print("Entity: " + entity0->GetKeyValue("name") + " collided with: " + entity1->GetKeyValue("name"));' in CollisionHook function but nothing in console and 2 more questions: 1: what do you mean with: // please make sure in the editor that you have setup your collisions correctly so it will actually fire the collision callback 2: what means collision type? ((in level editor)scene -> object ->physics -> collision type) btw: thanks for the good and fast answers -Mex
-
I tried but was a little too much for my brain now can you please post an example and i will look at it? -Mex
-
I tried now: virtual void Collision(Entity* collidedEntity, const Vec3& position, const Vec3& normal, float speed); static void CollisionHook(Entity* entity0, Entity* entity1, float* position, float* normal, float speed); - in App.h and: void Collision(Entity* collidedEntity, const Vec3& position, const Vec3& normal, float speed){ } void CollisionHook(Entity* entity0, Entity* entity1, float* position, float* normal, float speed){ System::Print("Entity: " + entity0->GetKeyValue("name") + " collided with: " + entity1->GetKeyValue("name")); } - in App.cpp The error is: (it's german hope you can read it. it means 'external unresolved symbol...') i thougt i forgot to link any library but everything is set ok (or is some code wrong?) //Complete files: App.cpp: #include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } Vec3 camerarotation; #if defined (PLATFORM_WINDOWS) || defined (PLATFORM_MACOS) bool freelookmode=true; #else bool freelookmode=false; #endif Pivot* player; float moveSpeed; float strafeSpeed; bool sprinting = false; float jumpAcc; bool setCrouch = false; bool isCrouching = false; float playerHeight; Vec3 playerMovement; float sprintSpeed = 1.4; float crouchSpeed = 0.6; int pause = 1; Vec3 mouseposition; float pausex; float pausey; void MapLoader(Entity* entity, Object* extra){ ((App*)extra)->LoadMapEntity(entity); } Entity* trigger1; bool App::Start() { //Create a window window = Window::Create("White"); //Create a context context = Context::Create(window); //Create a world world = World::Create(); //Create a camera camera = Camera::Create(); camera->Move(0,2,0); //Hide the mouse cursor window->HideMouse(); std::string mapname = System::GetProperty("map","Maps/start.map"); Map::Load(mapname, MapLoader, (Object*)this); //Move the mouse to the center of the screen window->SetMousePosition(context->GetWidth()/2,context->GetHeight()/2); player = Pivot::Create(); player->SetPhysicsMode(Entity::CharacterPhysics); player->SetPosition(0,2,0); player->SetMass(1); playerHeight = 1.7; strafeSpeed = 35; moveSpeed = 35; jumpAcc = 100; pausex = 0; pausey = 0; mouseposition = window->GetMousePosition(); trigger1->AddHook(Entity::CollisionHook, (void*)CollisionHook); return true; } void App::LoadMapEntity(Entity* e){ if(e->GetKeyValue("name") == "trigger1"){ trigger1 = e; } } void Collision(Entity* collidedEntity, const Vec3& position, const Vec3& normal, float speed){ } void CollisionHook(Entity* entity0, Entity* entity1, float* position, float* normal, float speed){ System::Print("Entity: " + entity0->GetKeyValue("name") + " collided with: " + entity1->GetKeyValue("name")); } bool App::Loop() { //Close the window to end the program if (window->Closed()) return false; //Press escape to end freelook mode if (window->KeyHit(Key::Escape)) { exit(0); } .... Everything else has to do with character controllers, movement etc. so it's not really needed App.h: #pragma once #include "Leadwerks.h" using namespace Leadwerks; class App { public: Window* window; Context* context; World* world; Camera* camera; App(); virtual ~App(); void LoadMapEntity(Entity* e); virtual bool Start(); virtual bool Loop(); virtual void Collision(Entity* collidedEntity, const Vec3& position, const Vec3& normal, float speed); static void CollisionHook(Entity* entity0, Entity* entity1, float* position, float* normal, float speed); }; - Mex //Edit: if I add 'App::' in front of both function in App.cpp then i got the error: (translated by google translator:) Access violation when reading at position. I think something with my rguments is wrong but what? :/
-
//I'm writing here because i have 'no permission' for the Programming section :? Hello, I'm new to Leadwerks and i'm now trying to create triggers with C++ I found many examples but either it's for C and in C++ not working or it's old or anything nothing has really worked for me :/ So i'm asking is anyone able to give me a good example of a trigger (trigger enter and leave is important) or good ideas? Thanks, Mex