Jump to content

Andr3wHur5t

Members
  • Posts

    109
  • Joined

  • Last visited

Posts posted by Andr3wHur5t

  1. Hi,

    I am using LE3 with c++.

     

    I programmatically made a spotlight which I want it to appear on all surfaces but it only appears to show on non-lightmapped surfaces.

     

    I’ve messed with the material settings of the lightmapped surfaces, and the light itself but that didn’t seem to help.

     

    Can someone help me out???

     

    Thanks in advanced

  2. HI,

    I am having difficulties finding info on the setup of Netwerks in C++. By setup I mean how it needs to be initialized and terminated, how to connect to a host, and how to send a packet. If someone could point me in the right direction, or give me some information. Any help would be greatly appreciated.

    Thanks,

    Andrew

  3. Sence you are using a class we dont want to use a bool because if you make it a public member you still wont have acsess to it in the callback,or if you made it a global you would have to create a system to keep track of wich bool went to which Controller you can eather make a struct and put it in EntityUserData or use EntityKeys I will use EntityKeys

     

    this is just off of the top of my head; not sure if will compile.

     

    #include "engine.h"
    #include "Class_Name.h"
    
    //Collision Callback
    void _stdcall Controller_Collision_Callback( TEntity entity0, TEntity entity1, byte* position, byte* normal, byte* force, flt speed){
    //if our controller exists
    if(EntityExists(entity0)==1){
     //Set Jump to 1
     SetEntityKey(entity0,"Jump","1");
    }
    }
    //Constructor
    Class_Name::Class_Name(){
    //Create controller
    TBody Controller = CreateBodyBox(1,2,1);
    //Set Proproties
    //Collision type
    EntityType(Controller,3);
    //Mass
    EntityMass(Controller,10);
    //Set Collision Callback to Controller_Collision_Callback
    EntityCallback(Controller,(byte*)Controller_Collision_Callback,ENTITYCALLBACK_COLLISION);
    
    }
    //Call this function every time you want to update the controller
    void Class_Name::Update(){
    //Check if Controller Exists
    if(EntityExists(Controller)){
     //Check Jump
     if(GetEntityKey(Controller,"Jump","NULL")=="1"){
      //Make The Controller Jump
      SetBodyForce(Controller,Vec3(0,100,0));
      //Reset the Jump Key
      SetEntityKey(entity0,"Jump","0");
     }
    }
    }
    
    Class_Name::~Class_Name(){
    //Free controller
    FreeEntity(Controller);
    }
    

  4. to add a 2D image to your game you just need to load a texture then draw it

     

     

    //load image

    texture = LoadTexture("abstract::texture.dds");

     

     

    //call after each frame renderd

    {

    //set blend

    SetBlend(BLEND_ALPHA);

     

    //draw image at position 0,0 that has a width and height of 100

    DrawImage(texture,0,0,100,100);

     

    //set blend

    SetBlend(BLEND_NONE);

    }

  5. only three minor things I would change/add.

    1) control options because controls kind of tricky to use for some people.

    2) hints to a objective after a period of time of not reaching a objective .

    3) move enemy bots away from player when they spawn

    4) make sure the player dose not spawn off of a cliff.

     

    besides those things your game is awesome,

  6. Leadweks comes with a lua script that dose some of the things you want; you should start there it is located in the ledwerks folder under scripts then games.

     

    reload is resonably simple you could do somthing like this:

    int iAmmoInClip = 20;
    int iClip = 2;
    int iAmmoPerClip = 20;
    
    
    
    //main loop
    while( !KeyHit(KEY_ESCAPE) ){
    
    	//Checking if we hit the Left mouse button and making sure we have ammo.
    	if(MouseHit(1) && iAmmoInClip > 0){
    		//Place Shooting code Here
    		iAmmoInClip --;
    
    	}	
    
    	//if we are out of ammo in our clip auto reload
    	if(iAmmoInClip <= 0 && iClip > 0 ){
    		iClip --;
    		iAmmoInClip = iAmmoPerClip;
    	} 
    
    	//if we Hit the R key and have a xtra clip reload 
    	if(KeyHit(KEY_R) && iClip > 0 ){
    		iClip --;
    		iAmmoInClip = iAmmoPerClip;
    	} 
    
    
    
    }
    

  7. How much do you think a license for an XBox version of Leadwerks would cost?

     

    5,000-10,000 USD depnding how big a developer you are, i think.but still i think it would be a good option to be able to develop on concsoles.

×
×
  • Create New...