Jump to content

ErhanK

Members
  • Posts

    57
  • Joined

  • Last visited

Posts posted by ErhanK

  1. Hi, I will try again.. After building, I started it from the editor and start.map was open. This is my new computer. I freshly installed the 0.9.5 version and created a project for the first time. It was not a project I had worked on before. However, when I created a fresh project, the project manager informed me to upgrade the project.

  2. I started a project and built it as both debug and release. Either way, the game hangs on a black screen at the start map.

    Windows 11 Pro 64-bit (10.0, Build 22631)

    13th Gen Intel(R) Core(TM) i7-13700H (20 CPUs), ~2.4GHz

    NVIDIA GeForce RTX 4060 Laptop GPU
    32GB RAM

  3. 2 hours ago, Josh said:

    Your weapon handling here is really nice:
    https://www.youtube.com/watch?v=peC_APdJAcM

    Is the model switching motion animated or programmed? What about the iron sights motion? Where did the models come from?

    Thank you but none of those 3d assets are not made by me yet. 
    I decompile and use them temporarily for speed prototyping.
    They coming from cry of fear, stalker and doom 3 (enemies not seen in video). 
    My models are still under development but it will work fine.
    All of these motions are animated included iron sight.
    Btw i have to say something here. 
    The rifle scope seen in white, it's actually rendered by scope camera to texture and it's works fine in engine but,
    when i'm publish the game it's doesn't work.
     

  4. 33 minutes ago, Josh said:

    They don't have any dimensions. It's just a point in space. I suppose you could search though all the vertices of a mesh, find all vertices that have any attachment to that bone, and find bounding box of all vertices?  Or something? But the question doesn't really make sense.

    I'm just trying to make automatic ragdoll but if a bone is just a point you right. it will doesn't make sense. 
    I thought it might have a beginning and an end like in a blender.

  5. 6 hours ago, reepblue said:

    This is because EOF is conflicting with stream->EOF. What are you trying to do that the engine's stream class can't?

    I'm trying to get it line by line with stop delimeter. I don't know if it exist in Stream class but simply i'm trying this..

    ifstream myfile(filename);
    
    if(myfile.is_open())
    {
        string item;
        string name;
        string type;
        while(!myfile.eof())
        {
            getline(myfile,item,'|');
            
            getline(myfile,name,'|');
            while(getline(myfile,type,'|'))
            {
                    cout<<type<<endl;
            }
            getline(myfile,type,'\n');
        }
        myfile.close();
    }

    Maybe i can do some extraction after stream->ReadLine()

  6. Hi. When i'm add the fstream header to my project, i'm getting this error : 'EOF': undeclared identifier. It's happens only in leadwerk project. Why is it?

    I'm trying to parse a custom file like this code:

    entityDef weapon_shotgun 
    {
        "weapon_name"               "weapon_shotgun"
        "def_projectile"            "projectile_bullet_shotgun"
        "ammoType"                  "ammo_shells"
        "ammoRequired"              "1"
        "clipSize"                  "8"
        "mtr_flashShader"           "muzzleflash"
    }

    so i can generate my entities from it.

    Capture2.PNG

    Capture.PNG

  7. I want to call the custom function in a c++ class ... I have one more question. I don't know which is better. I've created a custom actor class. This class creates an entity within itself and attaches itself to it. Should I use this, or should I create an entity, also create a custom actor and then assign that actor to that entity? I gave an example below.

    //Header
    class EnemyBaseActor : public Actor {
    public:
        EnemyBaseActor();
    };
    //CPP
    EnemyBaseActor::EnemyBaseActor(){
        this->entity = Model::Load("Models/Zombie.mdl"); 
        this->entity->SetActor(this);   
    }

    OR

    // In the main ex.
    Entity* myEntity = Model::Load("Models/Zombie.mdl");
    Actor* zombieActor = new EnemyBaseActor(); //My custom actor.
    myEntity->SetActor(zombieActor);
    //zombieActor->Release(); // It's doesn't work. So i didn'n write it.

    it works in two ways, but which one is right?

  8. When the bullet I fired hits the wall, smoke comes out. Such a change in lights occurs throughout the lifetime of the smoke. Is this a bug or am I making a mistake?

     

     

    Here is my code

    {
      	//initial codes up here
    	//Smoke emitter
    	smokeMaterial = Material::Load("Materials/Effects/smoke.mat");
    	hitEmitter[1] = Emitter::Create();
    	hitEmitter[1]->SetCollisionType(0);
    	hitEmitter[1]->SetColor(1, 1, 1, 0.25);
    	hitEmitter[1]->SetMaterial(smokeMaterial);
    	hitEmitter[1]->SetEmissionVolume(0.05, 0.05, 0.05);
    	hitEmitter[1]->SetVelocity(0.5, 0.5, 0.5, 1);
    	hitEmitter[1]->SetParticleCount(18);
    	hitEmitter[1]->SetReleaseQuantity(18);
    	hitEmitter[1]->SetMaxScale(4);
    	hitEmitter[1]->SetDuration(1500);
    	hitEmitter[1]->AddScaleControlPoint(0, 0.7);
    	hitEmitter[1]->AddScaleControlPoint(1, 1);
    	hitEmitter[1]->SetRotationSpeed(8);
    	hitEmitter[1]->SetAcceleration(0,-1.2,0);
    	hitEmitter[1]->Hide();
    
    	hitEmitter[0]->SetParent(this->entity);
    	hitEmitter[0]->SetPosition(0.0f, 0.0f, 0.0f, false);
    	hitEmitter[0]->SetShadowMode(0);
    	hitEmitter[0]->Show();
    	hitEmitter[0]->SetLoopMode(false, true);
    
    	lifeTime = 12000;
    	fadeTime = 4000;
    	fadeStart = Time::GetCurrent() + lifeTime - fadeTime;
    }
    
    void BulletHit::UpdateWorld()
    {
    	int currentTime = Time::GetCurrent();
    	if (currentTime > fadeStart) {
    		float alpha = 1.0f - (currentTime - fadeStart) / fadeTime;
    		if (alpha <= 0) {
    			this->entity->Release();
    		}	
    	}
    			
    }
    	

     

  9. Hello there. I'm trying to get the texture path on pickinfo's surface. If I can get the path name, I'll specify the bullet impact effect from the postfix I added to the texture name (eg myTexture_wood or myTexture2_metal). But the nullptr value is returned. Here is my debug window. can anybody help?

    nullptr.PNG

  10. Is it correct to add the Baked lighting map from the blender cycles as an emission and diffuse shader to the leadwerks? I tried, but there's no decal on it. How would it be? Would it give such an image? Anybody try anything like that?

    1494407939534.jpeg

  11. This is my RTS project's mouse zoom code. I hope this c++ code can give you idea.

    float cameraDistance = 15.0f;
    float smoothness = 15.0f;
    float zoomRangeMin = 8.0f;
    float zoomRangeMax = 20.0f;;
    Vec3 playerCameraPos;
    Vec3 playerCameraNewPos;
    float scrollSpeedFPS;
    float mouseWheel;
    
    int getMouseWheelDirection() {
    	int wheelReturn = 0;
    	float mouseWheelPos = Window::GetCurrent()->GetMousePosition().z;
    
    	if (mouseWheel != mouseWheelPos) {
    		if (mouseWheelPos < mouseWheel) {
    			wheelReturn = 2; //Wheel Down
    		}
    		else if (mouseWheelPos > mouseWheel) {
    			wheelReturn = 1; //Wheel Up
    		}
    		mouseWheel = mouseWheelPos;
    	}
    	return wheelReturn;
    }
    
    void mouseMovement()
    {
        playerCameraPos = playerCamera->GetPosition();
        playerCameraNewPos = playerCameraPos;
        scrollSpeedFPS = scrollSpeed * Time::GetSpeed();
        
        if (playerCameraNewPos.y != cameraDistance) {
    		playerCameraNewPos.y = Math::Curve(cameraDistance, playerCameraNewPos.y, smoothness / Time::GetSpeed());
    	}
    
    	int mouseWheelDirection = getMouseWheelDirection();
    	if (mouseWheelDirection) {
    		if (mouseWheelDirection == 1) {
    			if (cameraDistance < zoomRangeMax) {
    				cameraDistance = cameraDistance + 2;
    			}		
    		}
    		else if(mouseWheelDirection == 2){
    			if (cameraDistance > zoomRangeMin) {
    				cameraDistance = cameraDistance - 2;		
    			}	
    		}
    	}
    
    	playerCamera->SetPosition(playerCameraNewPos);
    }

     

    • Confused 1
×
×
  • Create New...