Jump to content

ghoflvhxj

Members
  • Content Count

    74
  • Joined

  • Last visited

Community Reputation

3 Neutral

About ghoflvhxj

  • Rank
    Advanced Member
  • Birthday 02/26/1996

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. final exam... still i have one lecture. i'm dying :(

    1. Josh

      Josh

      The most useful strategy I found during college was to convince yourself the world will end the day after exams. There is nothing to worry about. Just focus on packing that information into your brain. Sink into the material completely and let it become your entire existence. There is nothing else. Also, review material before you go to sleep and you will memorize it in your dreams. And stay off the internet!

  2. ghoflvhxj

    world->clear() and camera

    Hello guys, i started to develop new game recently As always i got difficult to do it. so i post question about this. i got exception about camera. this occur after use world->Clear() to clear old map. i wrote camera->AddRef() before wolrd->Clear() but why exception occur? I'll wait for your answers! bool App::Start() { /***/ camera = Leadwerks::Camera::Create(); camera->AddRef(); if (!Leadwerks::Map::Load("maps/map1.map")) return false; return true; } bool App::Loop() { if (window->KeyHit(Leadwerks::Key::F)) { world->Clear(); camera->SetDebugPhysicsMode(camera->GetDebugPhysicsMode() == true ? false : true); //occur exception! Leadwerks::Map::Load("maps/test.map"); } /***/ }
  3. ghoflvhxj

    Widget Link button question.

    thank you josh!
  4. ghoflvhxj

    Widget Link button question.

    i'm talk about something different you said. look this image. if i made 'link' button which parent set to 'base', general button appear. but i set 'link' button's parent to panel it appear good. no general button. i want to know how to disappear that.
  5. ghoflvhxj

    Widget Link button question.

    sorry i code at app.cpp and app.h i upload this two files. App.h App.cpp when i set btn's parent to 'gui->GetBase()' the button look wrong. but i set btn's parent to 'panel' the button look normal.
  6. ghoflvhxj

    Widget Link button question.

    I think i did what Josh said. this code make 'Link' button in scripts/menu.lua local gui = GUI:Create(context) --Create a link button GameMenu.newbutton = Widget:Button("NEW GAME",100,gui:GetBase():GetSize().y/2-60,300,20,gui:GetBase()) GameMenu.newbutton:SetString("style","Link") GameMenu.newbutton:SetAlignment(1,0,0,0) GameMenu.options = Widget:Button("OPTIONS",100,gui:GetBase():GetSize().y/2-10,300,20,gui:GetBase()) GameMenu.options:SetString("style","Link") GameMenu.options:SetAlignment(1,0,0,0) GameMenu.quit = Widget:Button("QUIT",100,gui:GetBase():GetSize().y/2+40,300,20,gui:GetBase()) GameMenu.quit:SetString("style","Link") GameMenu.quit:SetAlignment(1,0,0,0) i write this code in c++. gui = Leadwerks::GUI::Create(Leadwerks::Context::GetCurrent()); Leadwerks::Widget* base = gui->GetBase(); btn_start = Leadwerks::Widget::Button("start", 100, 100, 100, 50, base); btn_start->SetString("style", "Link"); Could i know what i did worng?
  7. ghoflvhxj

    Widget Link button question.

    gui = Leadwerks::GUI::Create(Leadwerks::Context::GetCurrent()); Leadwerks::Widget* base = gui->GetBase(); btn_start = Leadwerks::Widget::Button("start", 100, 100, 100, 50, base); btn_start->SetString("style", "Link"); hi. I'm trying to make UI that will apply to my game. but, it does not work out from beginning. haha I had make simple 'Link' button. but it looks wrong. how can i fix it? I would appreciate your reply.
  8. ghoflvhxj

    camera pick is not working correctly.

    ok, here is my code. bool Player::Pick() { //if player grab the entity, return true. if (pick_state == PICK_UP) return true; pick_state = PICK_EMPTY; pick_image = nullptr; if (!camera->Pick(context_halfwidth, context_halfheight, pickinfo)) return false; pick = pickinfo.GetEntity(); std::cout << pick->GetClassNameA() << " " << classname << std::endl; std::cout << pick->GetPhysicsMode() << " " << physics << std::endl; std::cout << pick->GetCollisionType() << " " << collision << std::endl; if (window->KeyDown(Leadwerks::Key::R)) { Leadwerks::Vec3 a = Leadwerks::Transform::Point(pickinfo.position, pick, nullptr); t->SetPosition(a); } //Check classname, physicsmode, collisiontype if (pick->GetClassNameA() != "Model" || pick->GetPhysicsMode() != Leadwerks::Entity::RigidBodyPhysics || pick->GetCollisionType() != Leadwerks::Collision::Prop) return false; //Check distance and mass if (pick->GetDistance(character) > pick_distance_limit || pick->GetMass() > pick_mass_limit) return false; pick_state = PICK_PICK; pick_image = hand_pick; return true; } void Player::PickUp() { //Check distance if (pick->GetDistance(character) > pick_distance_limit) { PickInit(); return; } //if the entity's first pick if (pick_state == PICK_PICK) { pick_mass = pick->GetMass(); //Transformation of the pick position from localspace to globalspace. Leadwerks::Vec3 pick_pos = Leadwerks::Transform::Point(pickinfo.position, pick, nullptr); //Create joint pick_joint = Leadwerks::Joint::Kinematic(pick_pos.x, pick_pos.y, pick_pos.z, pick); pick_joint->SetFriction(1000, 10000 - pick_mass * pick_mass * 10); joint_target_pos_gap = pick->GetPosition(true) - pick_pos; } else { Leadwerks::Vec3 camera_target_pos = camera_pivot->GetPosition(false); camera_target_pos.z += 1.2; camera_target_pos = Leadwerks::Transform::Point(camera_target_pos, camera_pivot, nullptr); //Joint work Leadwerks::Vec3 joint_target_pos = camera_target_pos + joint_target_pos_gap; pick_joint->SetTargetPosition(joint_target_pos, 1.0f - (pick_mass * 2.0)/100); } pick_state = PICK_UP; pick_image = hand_grab; } Additionally, the ClassName of the entities in the video are "Model", "PhysicsMode" is "RigidBodyPhysics" and "CollisionType" is "Prop". And, the entitiy that did not 'pick' from 10 to 25 seconds of video were 'pick' after the collision at 27sec.
  9. Hello guys. please look this video. I could not pick some entities. why?
  10. ghoflvhxj

    how do i fix this error?

    ok thank you
  11. ghoflvhxj

    how do i fix this error?

    "Error: No debugger hostname supplied in command line." The output directory and working directory same directory as "$(SolutionDir)..\..\" But it still remains. I do not have a big problem working, but I want to fix it. How do i fix this erorr?
  12. ghoflvhxj

    I joined the army.

    Hi guys. I joined the army because Korean army is conscription. I wuold discharge after 20 months. Although I enlisted, I would not give up the dream of creating a game. See you later.
  13. ghoflvhxj

    Font question.

    Thank you Josh. Perhaps, Leadwerks Engine is there any plan to support Hangul font?
  14. ghoflvhxj

    Font question.

    Hi guys. I tried to add some font(korean) in my project a few hours ago but i didn't get good result. I think leadwerks engine doesn't surpport korean font. What can i do to use korean font?
  15. ghoflvhxj

    How to access variables from other .lua file?

    Thank you. self.enemy.script:SetMode("dying")
×