Jump to content

02arnoldj

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by 02arnoldj

  1. Does Anybody else have this problem? For example. in 5.37 (when i was on win 7 32bit) I could make a square 128x128 in Photoshop CS5, add an alpha layer and just make the whole layer a dark grey, save it as a .png, load it into 3DWS and wahey! I had a working transparent texture Now however 5.37 doesnt work due to my Win 7 64bit OS i assume! and i cant get the textures to be transparent in version 5.6 (the newest)! This is driving me mad
  2. Thanks guys, i was thinking about using the editor and setting a camera to view the menu. That way i could have a 3D menu that moves slightly etc when you select an Option. Kinda like Race Driver GRID if anyone remembers that?
  3. Hi there, What do people use to make Menus for their games ? James
  4. Hi all! Im running 3d world studio 5.6 on windows 7 Ultimate (SP1) x64. Ive made Transparent Textures using an Alpha layer in Photoshop CS5 and when i apply them to just a simple Plane in the Program, theyre not transparent in either .png or .dds (DXT5) format. They used to work in 5.37 Builder edition. Does anybody know why this is? Thanks guys, JaMeS Tried installing Version 5.37 (builders edition) in Compatibility mode WIN XP SP3 and run the installer as Administrator. Also once installed like that, i run the .exe the same but still no joy !
  5. Hi guys, anyone experienced in 3ds max ? Iv'e googled it to find out why or how this is happening and there is no explanation i can find. Iv'e got a helicopter modeled in 3ds max 2010. Ive set the Pivot for the top blade and the rear blade. I centred the pivot to the children of the body (bladerear and bladetop) When mince turns the blades in LE 2.5 with a script he made,telling each blade to rotate on a certain axis, they sort of turn and then go back and forwards and backwards as if they were coliding with the body itself. It's strange, also they don't rotate correctly on their Axis, the top one is at an angle facing upwards slightly and the rear facing out to one side although they ARE dead straight in 3ds max. I export them as an FBX and use LE's fbxtogmf.exe. In the model viewer it recognises the Body is the parent and the blades are children in the hierarchy. Any ideas would be much appreciated. Thanks again, James **********************************************SOLVED THANKS TO MACKLEBEE*******************************************************
  6. Thanks for Clarifying that for us
  7. I did that thanks mate. Its an error with Resizing the bone, or you can reset Transform and Scale in the Hierarchy. Neither of which actually worked
  8. Hello again all! Im trying to export a gun ive added a bone to in order to Animate a part of the gun only. I get this error when exporting it to .FBX format " One or more objects in the scene has local axes that are not perpendicular to each other (non-orthogonal). The FBX plug-in only supports orthogonal (or perpendicular) axes and will not correctly import or export any transformations that involve non-perpendicular local axes. This can create an inaccurate appearance with the affected objects: -Bone01 " Ive added the bone where i need it, then added the Skin Modifier to the section of the gun to be animated. Set the animation and tried to Export. Im not too sure on a Perpendicular Axis?? HEEEEEEEEEEEELp lol!
  9. Thanks again Josh. That's resolved. When your'e sending a message to something where does the message go in the hierarchy ? Also, is the new version as powerful as LE2 as in, Obviously Android Phones aren't all that powerful so I was wondering if the Engine has been designed to only be as powerful as a say Android 4 Device etc... Or does it automatically optimize for each device
  10. Back in 2004 We wrote our own path-finding system for DarkBasic Professional used in a RTS> Reiners World. It ran in the background and had a job system too allowing for literally tthousend units unlike RedAlert. Graphically it sucks but We only had Reiner Prokeins Graphics to work with. It uses tile maps of over 1 million tiles(1024*1034) Breaks barriers on unit amounts and the smoke and weapons. It also ran timer based,same on any machine. We have done things that many others have struggled with. Believe it or not 2d character control is far harder then 3d. Every frame and every action has to be controlled. We can see why this powerful Engine has a relative small User Base, Its hard to find answers. Credit To Chris Man Macklebee Red October Josh as determined as we are we are getting nowhere fast. The guys who know seem to of forgot what its like to start out. Determination is running thin now. You have to buy it first before you can check out the knowledge base thoroughly. (Not Great) We could do with help on using the AI path system. We could do with help sending Messages(shot) from bullet.lua to crawler character. We could do with help on turning a loaded object into separate hierarchy pieces for ragdoll and decapitation of body parts . The most important thing we need to know before buying this is Prob no one seems to want to confirm is collision. We found that raycasting(PICK..) a character that entered the game standing, when that character lays down the cast will hit the object as if it was standing?? Please help us
  11. In 5.37 the Builder edition Mince purchased, the .PNG's worked and transparency worked, however i had a problem with png's not being transparent in version 5.6
  12. Why is do raycast collisions true at un-animated characters? (Standing Arms Out) Can the characters physics be updated for accurate collision? if not can we treat it passable and have collision boxes that user makes? Please Help?
  13. Got payslip Today money should be in bank for LE2&3 in couple days!! This Engine has rejuvenated us, were like a big kids again. Bullet.Lua And Message! The bullet checks the next position is empty until it hits something. If we wanted to store what it hit what do we reference? also can we check to see if the hit something can except messages? and how to send a int or float value as a message? We made some blocks, that if receive a message shot will play a ouch.ogg if they get shot twice they free them selves. ideally we want to pass bullet distance traveled as the message. Thanks again for all your help guys!!, thanks to you, us two Outcasts are catching up !!
  14. We made the minigun in two parts, we can rotate the Barrels like this. ty
  15. I Googled leadwerks engine examples and found a Site with a description about a windmill (must have been version 2.3 i guess) so i followed a link to download it and there it was. I now have it animated in 2.5 Thanks
  16. TY I think I did try that, We really appreciate the help.
  17. would instead; we have a lua for mini gun that receives messages, and the fps lua would send message to that mini gun?
  18. --added to top local minigun = LoadMesh("abstract::minigun.gmf") --tried it with requires script& class = create script --that didnt work either. -added at top object.barrels = model:FindChild("barrels") minigun:SetParent(fw.main.camera,0) minigun:SetPosition(Vec3(-0.15*gunscale,-0.04*gunscale,0.25*gunscale),0) minigun:SetScale(Vec3(0.03*gunscale,0.03*gunscale,0.03*gunscale)) local gundisplayposition = minigun:GetPosition() --Added to main loop if MouseDown(1)==1 then if gun==2 then if self.barrels~=nil then self.barrels:Turn(Vec3(0,1*AppSpeed(),0)) end end end
  19. So the Lua Script following Will show the reload animation frames of smg. the sound files are self explanatory -ly named. The green parts are what we added to control reload/Fire/after some time lowers gun. {R} = reload. require("Scripts/constants/collision_const") require("Scripts/constants/engine_const") require("Scripts/LinkedList") require("Scripts/filesystem") require("Scripts/math/math") require("scripts/classes/bullet") --Variables dx=0.0 dy=0.0 camerapitch=0.0 camerayaw=0.0 move=0.0 strafe=0.0 --gun gun = 1 ammo = 0 maxammo = 36 gunfirefrequency = 1 gunout = 0 --frames lastfiretime = 0.0 frame =175 reloadsequence = 82 reloadtime = reloadsequence reload = 1 rstate = 0 bulletcase = 0 bcasetodrop = 0 shellv = 0 --Create a player controller controller=CreateController(1.8,0.45,0.25,45) controller:SetCollisionType(COLLISION_CHARACTER,0) controller:SetPositionf(0,2,0,0) controller:SetMass(10) controller:SetPosition(fw.main.camera.position) camerapitch=fw.main.camera.rotation.x camerayaw=fw.main.camera.rotation.y controller:Move(Vec3(0,-0.9,0)) local gunscale=0.6 local vwep = LoadMesh("abstract::vwep_hands.gmf") --[[ local minigun = LoadMesh("abstract::minigun.gmf") object.barrels = model:FindChild("barrels") minigun:SetParent(fw.main.camera,0) minigun:SetPosition(Vec3(-0.18*gunscale,-0.03*gunscale,0.37*gunscale),0) minigun:SetScale(Vec3(0.04*gunscale,0.04*gunscale,0.04*gunscale)) local gundisplayposition = minigun:GetPosition() LoadMesh("abstract::vwep_gun.gmf",vwep) vwep:SetParent(fw.main.camera,0) vwep:SetPosition(Vec3(-0.18*gunscale,-0.03*gunscale,0.37*gunscale),0) vwep:SetScale(Vec3(0.04*gunscale,0.04*gunscale,0.04*gunscale)) local gundisplayposition = vwep:GetPosition() sound_gunshot = LoadSound("abstract::gunshot.ogg") source_gunshot = CreateSource(sound_gunshot) source_gunshot:SetVolume(0.5) --reload sections for precision! sound_guncremove = LoadSound("abstract::cremove.ogg") source_guncremove = CreateSource(sound_guncremove) source_guncremove:SetVolume(0.5) sound_guncreplace = LoadSound("abstract::creplace.ogg") source_guncreplace = CreateSource(sound_guncreplace) source_guncreplace:SetVolume(0.5) sound_guncock = LoadSound("abstract::****.ogg") source_guncock = CreateSource(sound_guncock) source_guncock:SetVolume(0.5) sound_guncempty = LoadSound("abstract::cempty.ogg") source_guncempty = CreateSource(sound_guncempty) source_guncempty:SetVolume(0.5) sound_shelld1 = LoadSound("abstract::shelldrop1.ogg") source_shelld1 = CreateSource(sound_shelld1) source_shelld1:SetVolume(0.5) sound_shelld2 = LoadSound("abstract::shelldrop2.ogg") source_shelld2 = CreateSource(sound_shelld2) source_shelld2:SetVolume(0.5) sound_shelld3 = LoadSound("abstract::shelldrop3.ogg") source_shelld3 = CreateSource(sound_shelld3) source_shelld3:SetVolume(0.5) sound_shellr1 = LoadSound("abstract::shellroll1.ogg") source_shellr1 = CreateSource(sound_shellr1) source_shellr1:SetVolume(0.5) sound_shellr2 = LoadSound("abstract::shellroll2.ogg") source_shellr2 = CreateSource(sound_shellr2) source_shellr2:SetVolume(0.5) sound_shellr3 = LoadSound("abstract::shellroll3.ogg") source_shellr3 = CreateSource(sound_shellr3) source_shellr3:SetVolume(0.5) vwep :SetShadowMode(0,1) local displayposition=Vec3(-0.26/2.0,-0.03,0.19) local muzzleflash = CreatePointLight(9) muzzleflash:SetParent( vwep ) muzzleflash:SetColor(Vec4(1,0.6,0.0,1.0)) muzzleflash:SetPosition( displayposition ) muzzleflash:SetShadowMode(0) --c=CreateCube(fw.main.camera) --c:SetPositionf(0,0,5) HideMouse() MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2) FlushKeys() FlushMouse() local pick local camera = fw.main.camera local remainingtime local starttime=AppTime() local gameduration=2--length of game in minutes local gamemode=0 gunpos = vwep.position:Copy() local smoothedgunswayamplitude=0.0 local smoothedgunswayspeed =0.0 local guntime = 0.0 local recoil = 0.0 local lastfiretime=0.0 local smoothrecoil=0.0 local swaydamping=0.0 local smoothswaydamping=0.0 local lightsmoothing =0.0 local gunlight = 0.0 --Flashlight flashlight = {} flashlight.light = CreateSpotLight(8) flashlight.light:Hide() flashlight.sound_switch = LoadSound("abstract::switch.wav") flashlight.state=0 flashlight.light:SetConeAngles(30,35) flashlight.light:SetRotation(Vec3(5,0,0)) flashlight.light:SetShadowmapSize(512) flashlight.light:Paint(LoadMaterial("abstract::flashlight.mat")) function flashlight:SetState( state ) if state~=self.state then self.state=state if state==0 then self.light:Hide() else self.light:Show() end if self.sound_switch~=nil then self.sound_switch:Play() end end end function ShootBullet( position, direction ) -- local speed=100.0 -- local pick = LinePick( position, Vec3(position.x+direction.x * speed) ) end flashlight.light:Show() flashlight.light:Hide() --Main Loop while KeyHit(KEY_ESCAPE)==0 do --Shell Casing Sound Controll --shellr1 --shelld1 if bcasetodrop >0 then bcasetodrop = bcasetodrop - 1 shellv = math.random(1,5) if shellv ==1 then source_shelld1:Play() source_shellr1:Play() end if shellv ==2 then source_shelld2:Play() source_shellr2:Play() end if shellv ==3 then source_shelld3:Play() source_shellr3:Play() end if shellv ==4 then source_shelld1:Play() source_shellr3:Play() end if shellv ==5 then source_shelld2:Play() source_shellr1:Play() end end jump=KeyHit(KEY_SPACE)*6.0 if controller:IsAirborne()==1 then jump=0 end local time = AppTime()/3200.0 --local frame = time*(179.0-96.0)+96.0 --frame=Clamp( frame, 96, 179 ) --vwep:Animate(96,1,0,1) --if KeyDown(KEY_LCONTROL)==1 then -- controller:Crouch(1) --else -- controller:Crouch(0) --end --b:SetPositionf(math.sin(AppTime()/1000.0)*10+10,0,0) --Camera look gx=Round(GraphicsWidth()/2) gy=Round(GraphicsHeight()/2) dx=Curve((MouseX()-gx)/4.0,dx,3.0/AppSpeed()) dy=Curve((MouseY()-gy)/4.0,dy,3.0/AppSpeed()) MoveMouse(gx,gy) camerapitch=camerapitch+dy camerayaw=camerayaw-dx camerapitch=math.min(camerapitch,90) camerapitch=math.max(camerapitch,-90) fw.main.camera:SetRotationf(camerapitch,camerayaw,0,1) movespeed=6 movesmoothing=10 if controller:IsAirborne()==1 then movesmoothing=200 end --Player movement move=Curve( (KeyDown(KEY_W)-KeyDown(KEY_S))*movespeed,move,movesmoothing/AppSpeed()) strafe=Curve( (KeyDown(KEY_D)-KeyDown(KEY_A))*movespeed,strafe,movesmoothing/AppSpeed()) --Use objects if KeyHit(KEY_E)==1 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 pick.entity:SendMessage("use",controller,0) end end end --Update controller controller:Update(camerayaw,move,strafe,jump,40,1,KeyDown(KEY_LCONTROL)) fw:Update() if KeyHit(KEY_F)==1 then flashlight.state=1-flashlight.state if flashlight.state==0 then flashlight.light:Hide() else flashlight.light:Show() end if flashlight.sound_switch~=nil then flashlight.sound_switch:Play() end -- flashlight:SetState(1-flashlight.state) end --Position camera local h=1.7 if controller.crouchmode==1 then h=1.8*(2.0/3.0)-0.1 end camera:SetPositionf(controller.position.x,Curve(controller.position.y+h,camera.position.y,2.0/AppSpeed()),controller.position.z,1) time=AppTime() gunfirefrequency=80 gunswayspeed=0.001*20.0 gunoffset = gunpos:Copy() gunswayamplitude = 0.02 if KeyDown(KEY_W)==1 or KeyDown(KEY_D)==1 or KeyDown(KEY_A)==1 or KeyDown(KEY_S)==1 then gunswayamplitude = 0.03 gunswayspeed=0.005*20.0 end smoothedgunswayamplitude = Curve( gunswayamplitude, smoothedgunswayamplitude,8.0 ) smoothedgunswayspeed = Curve( gunswayspeed, smoothedgunswayspeed,8.0 ) if smoothrecoil<0.001 then guntime = guntime + AppSpeed() * smoothedgunswayspeed * math.max(0.0,1.0 - smoothswaydamping) end --collectgarbage(collect) gunoffset.z = gunoffset.z - smoothrecoil * 0.05 --smoothedgunswayamplitude = smoothedgunswayamplitude * (1.0 - smoothswaydamping) gunoffset.x = gunoffset.x + math.sin( guntime ) * smoothedgunswayamplitude * gunscale gunoffset.y = gunoffset.y + (1.0-math.cos( guntime*2.0 )) * 0.005 * gunscale-- * math.min(1.0,1.0 - smoothswaydamping)) vwep:SetPosition( gunoffset ) recoil = recoil-0.1 swaydamping = math.max( swaydamping - 0.05, 0.0 ) recoil = math.max(recoil,0.0) smoothrecoil=Curve(recoil,smoothrecoil,3.0) smoothswaydamping = Inc( swaydamping ,smoothswaydamping,0.01 ) gunlight = math.max( gunlight- 0.2, 0.0 ) lightsmoothing =gunlight-- Curve(gunlight,lightsmoothing,8.0) muzzleflash:SetColor(Vec4(1.0*lightsmoothing,0.6*lightsmoothing,0.0,1.0)) if lightsmoothing <0.01 then muzzleflash:Hide() end --if gunout == 1 then if gun==1 then --Reload if KeyDown(KEY_R)==1 then if ammo < maxammo then reload =1 end end --190 = lower gun for switch --fire gun = 70 --Reload Sequence! if reload == 1 then vwep:Animate( 176 - reloadtime,1,0,1) reloadtime = reloadtime - AppSpeed()/2 if rstate == 0 then if reloadtime - 62 <2 then source_guncremove:Play() rstate = 1 end end if rstate == 1 then if reloadtime - 25 <2 then source_guncreplace:Play() rstate = 2 end end if rstate == 2 then if reloadtime - 10 <2 then source_guncock:Play() rstate = 10 end end if reloadtime < 0.0 then reloadtime=reloadsequence reload = 0 rstate = 0 ammo = maxammo end end end --Fire weapon if MouseDown(1)==1 then if gun==2 then -- if self.barrels~=nil then -- self.barrels:Turn(Vec3(0,1*AppSpeed(),0)) -- end end if gun==1 then if AppTime()-lastfiretime > gunfirefrequency then if ammo > 0 then bulletcase = 1 bcasetodrop = bcasetodrop +1 frame =91 ammo = ammo -1 recoil = 1.0 lastfiretime=AppTime()+math.random(0,20) gunswayspeed=0.0 gunlight = 1.0 source_gunshot:Play() source_gunshot:SetPitch(1.0 + (math.random()-0.5)*0.05 ) swaydamping = 1.0 muzzleflash:Show() CreateBullet(vwep:GetPosition(1) , fw.main.camera.mat:K():Scale(300)) end if reload == 0 then if ammo <1 then if AppTime()-lastfiretime > gunfirefrequency then lastfiretime=AppTime()+math.random(0,20) sound_guncempty:Play() source_guncempty:SetPitch(1.0 + (math.random()-0.5)*0.05 ) end end end end end if reload ==0 then if bulletcase==1 then frame = frame +AppSpeed()/3 vwep:Animate( frame,1,0,1) --91 > 100 for shell eject frames if frame >96 then bulletcase = 0 frame = 180 end end end --Relax Gun After No Fire for while! if AppTime()-lastfiretime >10000 then if bulletcase==0 then if reload==0 then if frame < 183 then frame = frame + AppSpeed()/10 vwep:Animate( frame,1,0,1) end end end end --end --gunout=1 end UpdateBullets() flashlight.light:SetPosition(fw.main.camera:GetPosition(1)) flashlight.light:SetRotationf( CurveAngle( fw.main.camera.rotation.x, flashlight.light.rotation.x, 3.0/AppSpeed() ), CurveAngle( fw.main.camera.rotation.y, flashlight.light.rotation.y, 3.0/AppSpeed() ) ) flashlight.light:Movef(-0.07,-0.04,0.02) --c:SetParent(nil,1) fw:Render() --c:SetParent(fw.main.camera,1) Flip(0) end controller:Free() vwep:Free() ShowMouse() then we added the minigun bits
  20. Thanks Red & Macklebee. Got that done. The aim was that if we can get a limb to rotate, we could have a gun like a minigun with the barrels spinning but when we try this it come up with attempt to index a global =nil. In the windmills case it uses class, and is a script of a object that has been dropped in the editor. In this case We have a script that loads a gun and some sounds, and it all worked great. We then made a minigun in 3dsmax and tried to adapt the windmill code to rotate the barrels. this is when we get the error
  21. TY -We making Progress now, We got the gun to animate in lua so we done a reload sequence that loads 3 sound files Clip being pulled the clip back in and the ****: Then we play them at key frames. Now the thing we need to do is we need to make a script that we can use for any object that has animation files. That script will play the ide frames of the object/Character. I have look about all day I tried to make it up but get errors. I saw you explained to some1 a way that referenced actor:Play actor:Draw I tried the examples and I got errors again. When a entity is placed into Editor Im guessing it builds up a table with location/Size ect does it contain frames I am using the crawler So We know it has them but do you need to tell it they are there.? Is it possible to create scripts for characters in Lua that control AI of that character. then in c load the scene and control cam using keys but the characters use there scripts so move around? That way the AI will be Per Object and the game code becomes simple. 2 days to play gun animations! we could do with the help!
  22. Hi im using the Leadwerks Engine 2.5 Evaluation ver. I could do with the Script to animate a part of an object, I.E The Windmill's Blades. Also How to animate a character in the engine ? I have a character and the animations work in the Model Viewer but not in the engine? Thanks guys JaMeS
×
×
  • Create New...