-
Posts
48 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by hippokittie
-
When I imported some textures as .tex and .bmp files they will not make materials. It imports the images fine; but when I make a material and attach the diffuse and such it only leaves white coloring?
-
Yeah that was one of the tweaks I went for
-
Thank beo6 that's helpful. I am going to be adding in a bunch of seeds, so this will help a lot . I was told not to mess with the app.lua though, so would it be fine just to tweek this code a bit? I am going to be adding in a load screen image as well so it doesn't look frozen
-
so I would change the map selection back to the default? then call the table later? or would I set it as you have above and put the name of the map directly in the quotes? I have a similar code (what I took the random from) for random spawns. I adjusted it with the trigger touch to make this.
-
Hey so I have been messing around with the map changer that came with leadwerks (copied it and renamed it so I have the original still) to choose between random seed maps (initial starting areas the rest is generated) but when it tried to change maps it crashes or gives me a lua stack overflow issue. Is there something wrong with my code? Here it is. --[[ This script will act as a trigger to change the current map. Place this at the end of your map to make the player progress to the next level. ]]-- Script.mapname={} Script.mapname[0] = "" --string "Map Name" Script.mapname[1] = "" --string "Map Name" Script.mapname[2] = "" --string "Map Name" Script.mapname[3] = "" --string "Map Name" function Script:Start() self.enabled=true math.randomseed(Time:Millisecs()) math.random();math.random();math.random(); self.counter = 0 end function Script:Collision(entity, position, normal, speed) changemapname = math.random(0,3) end function Script:Enable()--in if self.enabled==false then self.enabled=true self:CallOutputs("Enable") end end function Script:Disable()--in if self.enabled then self.enabled=false self:CallOutputs("Disable") end end
-
Well that is good dark, with the default code it would add in sounds and adjust offset and rotation (based on what is in the code) but then again its possible that the fpsplayer script could have issues with weapons and changes their offset and rotation. It may also be because of the change in monster script that we are having issues with the damage. I did notice when I tried the default weapon script (melee) that it would produce code errors when you die looking for muzzle to hide.
-
what about putting int the set animation from my code to it? As well as the idle? Does it actually attack? Let me know bro!!!
-
I agree, but Josh is hard at work making sure the engine works properly so we will just have to mess around with the code till we get it working and give it out
-
I set the same offset my code has, and its still not there. It may also be rotated wrong, but when I try to change them it still isnt visible. The biggest issue is that it doesn't do damage to anything (I know because I set a creature to have a total of 2 hp and the weapon to do 50 ran around it facing every direction I could to try to hit it and nothing.
-
I made this script before that, as well as event the built in melee script doesn't work (it doesn't show my weapon or do damage just makes sounds). This script(though no sounds) had the weapon showing and did damage to them. I would gladly use the bilt in one if it was able to hurt things and show my weapon in the proper way.
-
Hey guys we have made a good melee weapon code, with help of some people on the forums and some goofing around on our part. It was working fine up until about 2 weeks ago, then it had an error on line 28 in the code saying "attempting to compare nil value". If you guys could help tell me what I am doing wrong that would be amazing. This is part of a melee/rpg pack I am working on for you guys to be able to use (featured in my game). Here is the code, feel free to use it but do tell me how to fix it @.@ import "Scripts/AnimationManager.lua" Script.offset = Vec3(.5,-.5,.3) --vec3 "Offset" --used to set the location of the weapon in relationship to the fpsplayer's camera Script.bulletrange=3 Script.bulletforce=10 Script.bulletdamage=24 function Script:Start() --self.entity:SetRotation(45,180,0) --cant set it here unless you change the fpsplayer script -- fpsplayer script sets the weapons rotation to (0,0,0) after it has been loaded self.fired = 0 -- self.animationmanager = AnimationManager:Create(self.entity)--sets up animationmanager end function Script:Fire() --using this just so i dont have to mess with the fpsplayer script self.animationmanager:SetAnimationSequence("swing",0.05,300,1) --Parameters = (sequence, speed, blendtime, mode) -- sequence equal to "swing" animation in model -- speed controls how fast to play animation -- blendtime controls how fast it changes from the previous animation -- mode controls whether animation plays once or loops. --App.camera:Pick() if (App.window:MouseDown(1)) then --self.picksphere:Hide() local pickinfo = PickInfo() --local p = self:GetMousePosition() local p = App.window:GetMousePosition() if (self.entity.location < bulletrange) then if entity.script.enemy==true then entity.script:Hurt(self.bulletdamage) else System:Print("nope") end end end end function Script:Reload() --using this becaue inherent fpsplayer script calls this function when R is hit self.animationmanager:SetAnimationSequence("idle",0.05,300,1) end function Script:BeginJump() -- called from fpsplayer end function Script:BeginLand() -- called from fpsplayer end function Script:Draw() self.entity:SetRotation(45,180,0) --settting the model's rotation to be able to see it --Animate the weapon self.animationmanager:Update() end function Script:Release() end
-
So I have a weapon pick up code (from Piller's youtube video). Now I like it, think it works alright; but I want to know if there is a way to edit it for "if used" but have no clue how that would work. I am not the strongest programmer. Also would it remove the currently equipped weapon? Like "if weapon == true, drop weapon.pickup"(weapon.pick up to drop the currently carried weapon and spawn a pick up identified in the weapons code infront of the player). It may be to much to ask just seeing if it is possible. I have other programming questions but will just try this for now (as it is very important). Thanks all and here is the code that I currently have. Script.vwepfile=""--path "VWep" "Prefab (*pfb):pfb|Prefabs" --Script.vwep=nil--entity function Script:Start() if self.vwepfile~="" then local prefab = Prefab:Load(self.vwepfile) if prefab~=nil then if prefab.script~=nil then self.vwep = prefab.script else prefab:Release() end end end end function Script:Use(player) if self.vwep then if type(player.AddWeapon)=="function" then if player.weapons~=nil then if player.weapons[self.index]==nil then player:AddWeapon(self.vwep) self.entity:Hide() end end end end end function Script:Collision(entity, position, normal, speed) if self.vwep then if entity.script~=nil then self:Use(entity.script) end end end Edit# the build in pick up code works kinda but if you already have a weapon then it wont let me switch to the pick-ed up weapon. So maybe just an edit to that to fix that? Like having an inventory or something?
-
Fixed it, apparently some of the faces where having issues, and I had to triangulate them instead of them being squares.
-
Im using maya autodesk 2010. The thing with the export function is that it just exports as is. But why would it work with the creatures but not the weapons and other models?
-
Here is a picture of the model textured in leadwerks so you can see what I am talking about http://postimg.org/image/7t46o8twr/
-
In leadwerks all of them, it just turns the whole model brown. The uv's in the modeling program are all fine, i even put it in unity amd udk and aplied the textures and it looked fine. The only doffrence is me using fbx in leadwerks for the model. I also have an issu now with something else but ill message you about it.
-
http://postimg.org/image/isvn2hy7v/ http://postimg.org/image/ej6dfbs0p/ http://postimg.org/image/5ak5cgwor/ There is the un textured uv, a textured uv, and a image from the 3d program. Any ideas?
-
Okay this may sound dumb but my textures arnt working. In my 3d modeling program they all look fine, and in the texture preview they look fine. Yet when they are on the model its just a solid color not my texture. Its not with all my models though, as my monsters all look fine. There is also an issue with the weapons as they look fine and textured in the previewer, but when in game they to are solid color. Not sure if things are going wrong when I import the models or if there is just an issue with how the texturing is being applied. Please do tell me I am not the only one with this issue!
-
So I plugged the script into the the editor, and still nothing. I don't know what I am doing wrong.............. The ai script I am using for the test is just the default ai script, altered the name and animation sequences, from leadwerks. I took the hurt function directly from the fpsweapon (that I called) and the ai has functions for hurt. The collision is set on a collision box on the blade as a prop, and I even tried making the box larger to see if that would work but it didn't... I am so confused
-
Helpful, but confusing. So with this kinda code it should fire off everytime the blade makes contact? import "Scripts/Objects/Player/FPSWeapon.lua" Script.damage=10 Script.entered = false Script.exited = false Script.hadCollision = false function Script:Start() self.enabled=true end function Script:Fire() local enemy = self:FindScriptedParent(Collision.entity,"Hurt") if enemy.script.health>0 then enemy.script:Hurt(self.damage,self.player) end --Blood emitter e = self.emitter[2]:Instance() e = tolua.cast(e,"Emitter") e:Show() e:SetLoopMode(false,true) e:SetPosition(pickinfo.position+pickinfo.normal*0.1) e:SetVelocity(0,0,0) end function Script:UpdatePhysics() if self.entered then Fire=true end if self.hadCollision == false then if self.exited == false then self.exited = true self.component:CallOutputs("OnExit") self.entered = false end end end self.hadCollision = false end function Script:Collision(entity, position, normal, speed) self.hadCollision = true self.component:CallOutputs("OnCollide") if self.entered == false then self.component:CallOutputs("OnEnter") self.entered = true self.exited = false end end
-
So I have been working for a few weeks on making and fixing up this code, and am at an impasse. I have the weapon equipping and swinging, but nothing is happening to the monsters. I have the code broken into 2 parts, 1 for the swinging and equip, and 1 (attached to a collision entity on the weapons blade) that when it collides with an enemy ai it is supposed to remove health from them. The second code I also plan on tweaking to include everyone who touches it (for traps) but have no clue. The code that isn't working is here. import "Scripts/Objects/Player/FPSWeapon.lua" Script.damage=10 function Script:Start() self.enabled=true end function Script:Collision(entity, position, normal, speed) if self.enabled then self.component:CallOutputs("Collision") end end function Script:Fire() local enemy = self:FindScriptedParent(Collision.entity,"Hurt") if enemy.script.health>0 then enemy.script:Hurt(self.damage,self.player) end --Blood emitter e = self.emitter[2]:Instance() e = tolua.cast(e,"Emitter") e:Show() e:SetLoopMode(false,true) e:SetPosition(pickinfo.position+pickinfo.normal*0.1) e:SetVelocity(0,0,0) end I brought in collision code directly into it so it would know what it was looking for, and imported the script for fps weapon to get the damage system working. It is showing no errors but at the same time doesn't do anything. Any Ideas? I just want to get it working, so I can tweak it for each weapon and trap.
-
Me and my team have been working with leadwerks for a little bit now, but have run into many issues with the programming, things are working and we don't know why or how, and things aren't working and we don't know why or how. We have been trying to do things ourselves and have also tried asking on the forums here, but feel as if we are just not skilled enough at programming. So we wanted to bring someone into the team who DOES know what they are doing. We have the full version on steam, so we can do c++ and lua scripts with no issues. Anyone here know where we can ask people about to join in? We don't have a lot of funding right now, but are setting up an indiegogo and would be more than willing to pay from that and from the profits...once the game is finished (for the profits that is, indiegogo funding will just be after we get the amount asked). Would that be a bad thing, and we should wait until after the indiegogo? I don't where to go, our last project everyone just kinda worked in their spare time...
-
- job
- programmer
-
(and 1 more)
Tagged with:
-
Alright cool, thank you again if I have any problems I will let you know! Once I get the "weak point" script tweaked and working better I will shoot it your way, never know when you might need it.
-
The only languages I have programmed well in was c#, unrealscript, and actionscript 2. I am told that c++ is like c#, not sure what to believe there as they also said unreal script was like visual basic. If I do stick with lua, would you be able to suggest a site to help understand it better?
-
Alright thank you ^.^ me and the other modeler are going to be retoping our monsters, most of the poly count is from the rounding of the body and face. I figured out how to make the melee weapon do damage, and goofing around with a bit of coding to figure it out, even found a way to randomize (between diffrent numbers) the damage to fit the rpg feel. I wrote a script that seems to be working that I will include in the complete package to be applied to specific bones to increase damage delt to the monsters if they are hit there, needs some tweaking and bug fixing but it kinda works . Would you suggest staying with lua or going more into the c++? I do have the full version is why I ask.