Jump to content

2ima

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by 2ima

  1. entity mass is 50, Physics Mode and Character Physics is set properly, 'normalizedmovement' X & Z values is set and working... maxaccel is maximal acceleration to disable enitity's element race.

    The thing is in what when I try to use constant values instead all of those still nothing

  2. using reference i found how to make entity movement and got such:

    move = window->KeyDown(Key::W) - window->KeyDown(Key::S);
    strafe = window->KeyDown(Key:) - window->KeyDown(Key::A);
    //Making sure that movements is normalized so that moving forward at the same time as strafing doesn't move your character faster
    normalizedmovement.z = move;
    normalizedmovement.x = strafe;
    normalizedmovement = normalizedmovement.Normalize() * movespeed;
    
    //Adjust and set the camera rotation
    playerrotation.x += mousespeed.y*sensitivity / 10.0;
    playerrotation.y += mousespeed.x*sensitivity / 10.0;
    entity->SetInput(playerrotation.y, normalizedmovement.z, normalizedmovement.x, jump, crouched, maxaccel);
    

     

    and entity is not moving! maybe somebody more experted than me can see my mistake?

    Checked out FPSplayer.lua, looks like just myne. Kinda magic) Maybe smb has more sufficient metod of entity movement? Thanks beforehand!)

  3. model_path = "G:/342/fff/Models/Characters/Crawler/crawler.mdl";

    model = Model::Load(model_path);

    model->SetAnimationName(1, "Run");

    std::cout << "Animation: " << model->GetAnimationName(1);

    anim = 42;

    std::cout << "*******animname***: " << model->animationname[1];

    model->SetAnimationFrame(Time::GetCurrent() / 100.0, 1, 1, 1);

    model->Update();

     

    Here's a problem: animation draws incorrectly, somebody knows how to fix it?

     

    12940654_m.png

  4. The thing is: how can I use a variable in one script stated on other script in lua?

    On example: I have 2 scripts: fps_gun.lua with a variable of ammo_count and a script App.lua with a variable named ammo_ammount. How can I use a ammo_count in App.lua(4example ammo_ammount=ammo_count)

    Thanks beforehand! unsure.png

×
×
  • Create New...