Jump to content

ghoflvhxj

Members
  • Posts

    76
  • Joined

  • Last visited

Everything posted by ghoflvhxj

  1. 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.
  2. 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.
  3. 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?
  4. 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.
  5. 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.
  6. Hello guys. please look this video. I could not pick some entities. why?
  7. "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?
  8. Thank you Josh. Perhaps, Leadwerks Engine is there any plan to support Hangul font?
  9. 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?
  10. Hi guys. I was making a trigger which, lead to death of an object, if collision with it occur. For example, there is a variable named 'health' in the MonsterAI.lua. i wrote SimpleTrigger.lua like this. Script.Enemy1pfb = "" --path "Enemy1" " Pfb file (.*pfb):pfb|Prefabs ----------------------------------------------------------------------------------------- self.enemy = Prefab::Load(self.Enemy1pfb) self.enemy.health = 0 Loading was perfect but i could not access to health. What should ㅑ do?
  11. Thanks for your reply. By the way, Did you know why speed parameter have 0?
  12. I use EntityCollisionCallback function to embody falling damage. Like this. void _stdcall EntityCollisionCallback(TEntity entity0, TEntity entity1, byte* position, byte* normal, byte* force, flt speed) { ... } SetEntityCallback(controller,(byte*)EntityCollisionCallback,ENTITYCALLBACK_COLLISION); But, "force" and "speed" parameter have only 0. Not to get 0 What can i do?
  13. Sorry, i'm not good at english. i'll explain more detail. um.. physcis did not move when animate door open, close frame.
  14. Hi guys. i was making door. but, it's not working good. Let's see below picture. physics did not move with model. How do i have to do?
  15. Hello guys. A few days ago i purchased 'ultimate unwrap 3d' and got some plugins. I think Leadwerks plugin will export .gmf file but .mdl file. I can't use this file format because i'm LE2 user. Is there some way to use .mdl file in LE2?
  16. I use emitter which in LE2 Ok, i understand. thanks Rick
  17. Yeah, I want to say "aviod piercing"! I tell you if i will find good way.
  18. I want to avoid piercing floor:)
  19. I don't know how to explain well to you beacuse I'm not good at in english. Hello guys. I need your help to modify my map. Let's see this picture. I have in sight emitter.
  20. ghoflvhxj

    My game

    I did not define name.
×
×
  • Create New...