DigitalHax Posted May 19, 2012 Share Posted May 19, 2012 SHUT UP AND TAKE MY MONEY Quote Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5. Life is too short to remove USB safely. Link to comment Share on other sites More sharing options...
Josh Posted May 20, 2012 Share Posted May 20, 2012 Okay, so I think we have established this is going to be a competitive advantage for Leadwerks. I counted 5 smileys in one post. XD Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
dennis Posted May 20, 2012 Share Posted May 20, 2012 Yes josh I want you to take my moneys Quote Link to comment Share on other sites More sharing options...
DigitalHax Posted May 25, 2012 Share Posted May 25, 2012 *Crams money down josh's throat* Quote Win7 64bit, Leadwerks SDK 2.5, Visual Studio 2012, 3DWS, 3ds Max, Photoshop CS5. Life is too short to remove USB safely. Link to comment Share on other sites More sharing options...
Benton Posted May 25, 2012 Author Share Posted May 25, 2012 *crams the promise of money down Josh's throat* You take IOU's right? Quote Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D Link to comment Share on other sites More sharing options...
Josh Posted June 4, 2012 Share Posted June 4, 2012 Here's another shot showing it actually working. The argument count is being loaded from scripts, and the functions can be specified as an argument or an execution function. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
macklebee Posted June 5, 2012 Share Posted June 5, 2012 please explain what that logic is doing... it looks like if box1 is enabled and the other two have values (of what?), then box4 will move? Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Josh Posted June 5, 2012 Share Posted June 5, 2012 There's really no logic to the function names, and they don't do anything. They just display the correct number of arguments. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted June 5, 2012 Share Posted June 5, 2012 So trying to follow this. So when Box 1 enabled is fired it'll call the box 4 enable function passing in box 2 and box 3 return value of GetValue() function. Something like: box4.enable(box2.GetValue(), box3.GetValue()) Putting them all to boxes makes it harder to understand. Are we going to be able to attach scripts to more of a generic "game object" or maybe even a pivot? Are you going to have pre-made entities like lights or sound? That way we could drag in a light entity and from box 4 that maybe has a collision script attacked we drag the OnCollide output to the light's TurnOn function, passing to it a variable we defined on a pivot? Quote Link to comment Share on other sites More sharing options...
Josh Posted June 6, 2012 Share Posted June 6, 2012 Putting them all to boxes makes it harder to understand. Are we going to be able to attach scripts to more of a generic "game object" or maybe even a pivot? Are you going to have pre-made entities like lights or sound? That way we could drag in a light entity and from box 4 that maybe has a collision script attacked we drag the OnCollide output to the light's TurnOn function, passing to it a variable we defined on a pivot? Yep. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Benton Posted June 6, 2012 Author Share Posted June 6, 2012 Take my money/IOU Dont forget docs. The most forgotten but useful thing for software. Make sure they are really detailed. Let Leadwerks 3 be known for really good docs! Quote Windows 7 Professional 64 bit, 16 gigs ram, 3.30GHz Quad Core, GeForce GTX 460 one gig, Leadwerks 2.5, Blender 2.62, Photoshop CS3, UU3D Link to comment Share on other sites More sharing options...
Josh Posted June 6, 2012 Share Posted June 6, 2012 Yeah, if I skipped on docs, I might as well not do anything. They're important, and the design of Leadwerks3D makes it easier for me to say "this is the way to do x". Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted June 6, 2012 Share Posted June 6, 2012 Function reloading from script files works, even with arguments attached to connections! This means you can dynamically edit scripts, and see the result immediately when you save, even if they are in use in the flowgraph. The code behind this is pretty complex, but I don't see any way to write clean and neat code to do such a complicated task. I think the trick here is to test, test, test, and make sure there are no mem leaks. I try to keep the convoluted stuff in the editor, where no script is actually executed, and then it's easier to keep the engine code clean. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
dennis Posted June 9, 2012 Share Posted June 9, 2012 *THROWS MONEY AT THE SCREEN* Quote Link to comment Share on other sites More sharing options...
Josh Posted July 18, 2012 Share Posted July 18, 2012 Here's a sample script: Script.movement=Vec3(0)--Vec3 "Player movement" function Script:Attach() print("Calling Attach() function") end function Script:Update() local player = tolua.cast(self.entity,"Player")-- cast Entity to Player class if player~=nil then player:SetInput(0,1) end end Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 19, 2012 Share Posted July 19, 2012 The casting in the previous example was actually unnecessary. Here's a better example I will try out tomorrow: Script.target = nil--Entity Script.distance = 10--float Script.radius = 0.5--float Script.smoothness = 0.5--float --This script will make a camera follow any entity function Script:RenderWorld() --Make sure the target entity exists if self.target~=nil then --Get the target entity's position, in global coordinates local p0 = self.target:GetPosition(true) --Calculate a second point by backing up the camera away from the first point local p1 = p0 + Transform::Normal(0,0,-1,self.entity,nil) * distance --Perform a raycast to see if the ray hits anything local pick = self.entity.world:Raycast(p0,p1,self.radius) if (pick~=nil) then --If anything was hit, modify the camera position p1 = pick.position end --Set the camera position in global coordinates local currentpos = self.entity:GetPosition(true) if self.smoothness>0 then p1.x = Math:Curve(currentpos.x,p1.x,self.smoothness) p1.y = Math:Curve(currentpos.y,p1.y,self.smoothness) p1.z = Math:Curve(currentpos.z,p1.z,self.smoothness) end self.entity:SetPosition(p1,true) end end Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.