Jump to content

AggrorJorn

Members
  • Posts

    4,816
  • Joined

  • Last visited

Posts posted by AggrorJorn

  1. Yes I have. the light switch code is identical to the switch that comes with the sdk. I'm only using a different message.

    local n,target,targetmessage,args,delay
    		for n=0,7 do
    			target=self.model:GetTarget(n)
    			if target~=nil then
    				delay = tonumber( self.model:GetKey("delay"..n,"0") ) * 1000.0
    				if self.active==1 then
    					target:SendMessage("Hide",nil,delay)
    				else
    					target:SendMessage("Show",nil,delay)
    				end
    			end
    		end

     

    The lamp scriptshould should then something with these messages like:

    function object:ReceiveMessage(message,extra)
    
    	if message=="show" then
                           self.light:SetIntensity(2)
                   else
                           self.light:SetIntensity(0)
    

     

    Would I need to configure these messages in the class.lua first?

  2. Does anyone have an example regarding turning a light on and off via messages?

     

    I've been trying to get this to work by fooling around with the switch.lua for a while now, but sofar no good. I'm looking for a script that eihter sends a 'show' or 'hide' message. The light that can be turned on and of is created inside a lamp. Would anyone be so kind to help me out with this.

     

    This is the code of the lamp:

    require("scripts/class")
    
    local class=CreateClass(...)
    
    function class:CreateObject(model)
    local object=self.super:CreateObject(model)
    
    --Create light
    self.light=CreatePointLight(1,model)
    self.light:SetColorf(1,0.4,0.2,1,1)
    self.light:SetPositionf(0,0.1,-0.25,0)
    self.light:SetShadowOffset(0,0.80,0)
    
    end	
    end	
    

  3. Thanks guys, I have been using 3dws for a while, I am looking at a high end fps, I spent the last 2 years as a member of cod extreme crew and built many of the mods you see in x4 and x5 mods for cod. My focus is on 2 g fps game types multiplayer sniper and tactical realism. This said I am not concerned about low end system support as my target audience are used to high end gaming requirements. My critical features are

     

    Raycast for shooting

    real time animation

    high end graphics

    collision and physics

    map/level editor

    real world environments

    ai - passive

    3ds and x model support

     

    hope this helps to clearly define my goals

     

    - Raycasting is used in one the example scripts. For example by turning on and of a switch or when shooting a weapon.

    - With leadwerks engine 2.3 you can do realtime animations inside the editor using Lua.

    - high end graphics. The engine has the power to do so, however you need good models and textures to use that power.

    - Leadwerks has Newton physics integrated, although you could use your other physics systems. no support for that though.

    - the sandbox editor is used for editing levels, terrain creation, vegetaion placement

    - the SDK comes with a couple of tools to convert your models to the leadwerks engine format: gmf. The tools you need are 3ds2gmf.exe and coonvertmesh.exe.

  4. Thanks for the Info Josh and Volker, they are realy helpfull.

     

    I have to be honest: I totaly misunderstood the physics type 'scene'. I thought this meant, that the object receives collision from everything that is inside the 'scene' or editor at moment.

     

    I doubt if my explanation about the character controller is true then:

    o Character. Only the Character controller has collision with this object.

  5. Copy the gras folder in the vegetation folder for comparing. Rename gmf to your own grass. And give your texture the name of the existing grass texture. Please also post the mat file you are using.

  6. I made a very very BIG model and when I drag it into editor, it will allways LOD2 visible (because of my distance from center of model).

    well I cound node define LOD distance in ini file as below:

    Mymodel.ini:

    LODDistance="1000 2500"

     

    and also could not find other samples in available models.. how can I define LODDistance?

     

    I don't know why the ini file doesn't work. What you could do is copy the gmf model, and call it: modelnameLOD1.gmf.

    The editor thinks it needs to use LOD1 although its the same model.

     

    This is the ini convention for LOD:

     

    LODDistance=”distance_LOD1 distance_LOD2”

    LODDistance=”60 120”

  7. I've come acros some options in Leadwerks 2.3, where I know litlle or nothing about. Sometimes I can see someting change in the editor but then I still don't know what the option realy does or how to discribe it.

    Leadwerks SDK foler:

    Private.

    - Contains some models that are for private use only.

    Josh can you confirm this?

     

    Options menu - path:

    - Game Path. How do I use it and when?

     

    Options menu - controls:

    - Ctrl multiplier. what does this do?

     

    The usage of the following collision types:

    - Prop

    - Trigger

     

    Directional light

    - Linear offset.

    - Shadow distance.

     

    Point light

    - Linear offset.

    - Multiplicative offset.

     

    default Lua menu - General

    - active. Objects that are activated will perform Lua code (rotating blades.)

    - enable. difference with active?

     

    default Lua menu - Appearance

    - order. Can't seem to find out what is does.

     

    default Lua menu - Appearance

    - friction. I know what friction does, but I don't know why there are 2 values.

     

     

    Any help is appreciated.

  8. Ah, ok. But how does that have to be something new the engine does?

    Can't you add that kind of functionality using lua?

    I have no idea. So far I've only seen dynamic objects, but not realy drawable objects. But the terrain painter does something in that direction.

     

    With Lua it would be something like. drag the object in, which places 1 single vertex. IF second point is placed, create rectangle between the vertices based with some math function. That goes way beyond my skill

  9. Josh needs to make a new video about the editor:

     

    - Real time ambient effects

    - Reflection and refraction effects

    - huge terrains up to 33 milion triangles

    and now for the first time:

    - massive vegetable fields!

     

    Not but serious the engine is awesome. The community is great and to help you get started a User guide will be ready for download this weekend.

  10. I'm placing a door in a frames like some kind of prefab. I'm using the locker.lua as an example. I have a door frame with an extra pivot called 'doorhinge'. The model of the door is loaded perfectly in position. in the FPS controller Lua I can shoot at the door and the door open perfectly. But... when the playercontroller hits the door, the door completely freaks out. The door flies out of the hinges. When the player controller steps away from the door, the door positions itseld nicely back.

     

    The frame is not the problem. If I would position the door outside the frame, it has the same problem. The door is a convex hull created with phygen and the frame is a collision tree. Its realy weird, just like a previous topic: this code worked a couple of days ago.

  11. self.basement works just fine (even though self refers to class in this case)... but the parent needs to be object.model...

    Well it works now. Everyone thank you for helping. The script for every room was okay, it was just the self.model that needed to change in object.model

     

    This is the final script that completely works. If you have any suggestions on how to do this even better, let me know.

    require("scripts/class")
    
    local class=CreateClass(...)
    
    function class:CreateObject(model)
    local object=self.super:CreateObject(model)
    
    --Load all the rooms
    	--rooms
    	self.basement=LoadModel	        ("abstract::matt_house_basement.gmf")
    	self.kitchen=LoadModel		("abstract::matt_house_kitchen.gmf")
    	self.livingroom=LoadModel	("abstract::matt_house_livingroom.gmf")
    	self.hallwaydown=LoadModel	("abstract::matt_house_hallwaydown.gmf")
    	self.hallwayup=LoadModel	("abstract::matt_house_hallwayup.gmf")
    	self.storage=LoadModel		("abstract::matt_house_storage.gmf")
    	self.bedroom=LoadModel		("abstract::matt_house_bedroom.gmf")
    	self.studyroom=LoadModel	("abstract::matt_house_studyroom.gmf")
    	self.bathroom=LoadModel	        ("abstract::matt_house_bathroom.gmf")
    
    	--stairs
    	self.stairs_basement=LoadModel	("abstract::matt_house_stair-basement.gmf")
    	self.stairs_hallway=LoadModel	("abstract::matt_house_stair-hallway.gmf")
    	self.stairs_flipped=LoadModel	("abstract::matt_house_stair-flipped.gmf")
    
    	--stairs
    	self.railing=LoadModel		("abstract::matt_house_parts_railing.gmf")
    	self.floor_up=LoadModel	        ("abstract::matt_house_parts_tussenvloer-boven.gmf")
    	self.floor_down=LoadModel	("abstract::matt_house_parts_tussenvloer-onder.gmf")
    	self.stairs_ending=LoadModel	("abstract::matt_house_parts_wall-end-stairs.gmf")
    	self.stairs_side=LoadModel	("abstract::matt_house_parts_wall-side-stairs.gmf")	
    --Done loading all the rooms
    
    
    --parent objects to the house
    	--rooms
    	self.basement:SetParent	        (object.model)
    	self.kitchen:SetParent		(object.model)
    	self.livingroom:SetParent	(object.model)
    	self.hallwaydown:SetParent	(object.model)
    	self.hallwayup:SetParent	(object.model)
    	self.storage:SetParent		(object.model)
    	self.bedroom:SetParent		(object.model)
    	self.studyroom:SetParent	(object.model)
    	self.bathroom:SetParent         (object.model)
    
    	--stairs
    	self.stairs_basement:SetParent	(object.model)
    	self.stairs_hallway:SetParent	(object.model)
    	self.stairs_flipped:SetParent	(object.model)
    
    	--parts
    	self.railing:SetParent		(object.model)
    	self.floor_up:SetParent	        (object.model)
    	self.floor_down:SetParent	(object.model)
    	self.stairs_ending:SetParent	(object.model)
    	self.stairs_side:SetParent	(object.model)
    --done with parenting
    
    
    function object:Free(model)
    	self.super:Free()
    end
    
    end

  12. yes... thats exactly what i mean... no reason to use a dummy mesh when you already have a perfectly good model mesh.. :) or use the house as the foundation... makes no difference...

    Its frustrating, I'm at work now so I can't try out any of this stuff right now. It is a possibility (I thank you for it.)but it is more 'professional' to drag in the 'house' object, that loads every single room.

     

    @rick:

    thats true. the following models are being loaded. Id didn't want to make the topic endlessly long.

    • basement
    • hallwaydown
    • kitchen
    • livingroom
    • hallwayup
    • storageroom
    • bathroom
    • studyroom
    • bedroom
    • stair basement
    • stair hallway
    • railing
    • between floor up
    • between floor down

  13. interesting aggror... but there's no reason to use an extra object file.

     

    just have your entire house model put together with all the rooms... determine where you want a common pivot/origin for all of the room models. export them individually with the offset built in... then in the main house model's script, just add code to load the extra rooms as needed.

    isn't that the thing I'm already doing? Or do you mean: load for example the basement as the foundation (instead of the pivot), and it that lua file, load all the other rooms?

×
×
  • Create New...