Jump to content

gordonramp

Members
  • Posts

    398
  • Joined

  • Last visited

Posts posted by gordonramp

  1. If you want I'll make a video instruction of what I do. but if you wan to leave it alone for now then that s okay too.

    Sure Aggror, such a video must be very useful. I'm sure people would benefit from it :)

  2. Thanks for the suggestions Soamp, Although there is a lot of useful information here, I've currently abandoned this idea in favour of 'proximity triggers'. If I can get my head around 'pick object' some time in the future, I'll give it another go.

  3. Am applying this, will let you know the results...

     

    Update. When I add the function in step 4 (to an object's class script), I get an error message..'Attempt to index Global object a Nil value'.

     

    Aggror,

    If you have the time, a zipped working example would solve a lot of headache.. <_<

  4. Just a fast question.. Did you place the whole scene into a mesh?

    Not one mesh but basic indoor scenes are modelled in 3dws and are divided into two or three and imported into the Leadwerks Editor. Then objects are added.

    Setting a different collision type sounds like an interesting way to do it. I will look at that too.

  5. Thanks Joh, I'm writing my whole game in Lua.. and trying to learn the language as I go. This line from my example code seems to be the issue..

    if pick.entity:GetClass()==ENTITY_MODEL then

    I am able to pick any object as I said but not just one. If use the code as it is then the Player can pick the whole scene which is not good.

  6. Hi, I'm finally getting back into coding after a break making scenes. I've reached a block here and maybe someone can help out...

    I want to pick a specific object. The following code I've adapted works but works on any object. Any ideas on how I can make it specific to a particular object (model). Note: at the moment the code will hide and show the mouse.

     

    --pick an object 
    if MouseHit(1)==1 then
    	if picked==0 then
    		pick=CameraPick(camera,Vec3(GraphicsWidth()/2,GraphicsHeight()/2,2.0),0,0)
    		if pick~=nil then
    			repeat
    				if pick.entity:GetClass()==ENTITY_MODEL then
    					break
    				end
    				pick.entity=pick.entity.parent
    			until pick.entity==nil
    			if pick.entity~=nil then
    				ShowMouse()
    				picked=1
    
    			end
    		end
    	elseif picked==1 then
    		picked = 0
    	end
    end--       
    
    --Update controller        
    controller:Update(camerayaw,move,strafe,jump,40,10)        
    fw:Update() 
    
    if picked == 1 then
    	HideMouse()
    end  

  7. Hehe, well, in the modern world 'wind farms' are quite common and I've read about research that is being done on a paint that will generate a charge. ie. paint the roof of a house and hook up a couple of wires to the guttering and into a battery.. :)

  8. I looked online and a single 400watt generator is $1800.

    So that means it couldn't even power my computer which demands about 500watts on low consumption mode and 800watts at full throttle

    Pancakes,

    That doesn't mean you couldn't run your computer from power supplied by the generator. The power is stored and then extracted when required. For example, power is often saved as 12volt in a bank of deep cycle batteries, then an inverter is used to change it to another voltage (where I live it's 240) which can run a computer, fridge and whatever. All from the wind and sun. It is expensive to set up though, but I know of houses that are producing so much electricity that they are being payed for it as it is channelled into the main grid.

  9. Rich,

    I tried to make a wind generator once. I used a car generator and made the vanes from ply wood. First big wind, it flew apart because I hadn't put a 'governor' on it. Also the car generator required that it spin very fast. So what is required is a generator that will put out a charge at a slow rotation and some form of governing device that will prevent it from spinning too fast.

     

    Aggror,

    I grow and eat strawberries.

×
×
  • Create New...