The damage is detected by collision models, and the collision model of the little bird model sucks hell.
I won't be able to fix anything the next months because I'm not at home and don't have a computer available that can even run HL2 on low.
The damage is detected by collision models, and the collision model of the little bird model sucks hell.
I won't be able to fix anything the next months because I'm not at home and don't have a computer available that can even run HL2 on low.
Can you make it so you don't take damage from the heli blade when it's not actually spinning? If you just noclip into the blade or stand on it not only do you take damage like it's spinning at full power but it gets damaged as well and will eventually fall off. Even if you try to go through a gap in the blade it still damages both of you.
I wish we could have this without having the base.
Is there a "switch" somewhere that I can change to remove rotor damage altogether?
Nope, don't think there is.
Why did this get a disagree?
Wouldn't it be nice to not have to have everything WAC comes with, just to fly this amazing helicopter entity around?
I didn't add the ability to disable all scripts in the base to separate everything again.
No, because the base is awesome.
Some people have things in place already and don't want to flood our game with a million custom models. Pretty easy to understand that I want just the helicopter and not everything else. Man, you're a fascist, weegee.
I don't understand the logic of this sir, I'd rather just have the heli and not tons of custom models and scripts for people to have to download.
There is 1 (ONE) goddamn "custom model" in the base.
Edited:
http://weadco.googlecode.com/svn/tru...20Base/models/
SWEPs are over 200mb in custom models if I remember right. Removing a single lua script or not including a single thing broke everything for me.
Edited:
Plus there's all those models for the turrets and such aren't there?
Edited:
I'll try just using the base and the heli, and disabling all the scripts (is there some sort of global "turn everything off" command to make that easier?)
Edited:
wac_falldamage <-- Should I set this to 1 to make falldamage be at Source's default calculation levels?
wac_healthmod <-- Is this health regen, or a system that'll change damaging all together?
You, sir (or madam), are very disrespectful. I can have an opinion without being labeled a fascist.
You don't even know the meaning of the word respect, you hypocrite.
It seems you don't know what you're talking about, there are no SWEPs in the base. Get your stuff straight before you request something.
Oh and good job insulting somebody who is respectful to you.
He's not being very respectful at all. I didn't insult him. Insulting him would be calling him a name. I offered him an appropriate word in regards to his behavior.
I never said there were SWEPs in the base. I thought the entire thing was the base, not just the one part. Calm yourself.
You have quite a nice ban history there, not surprising.
Yeah... actually it isn't very incriminating at all. The majority are backseat mod posts because I go too far sometimes and I shouldn't. Two are actually something bad. Stay on topic, man.
The helicopter won't lift. Everything works except for that - this has been happening forever, even with Sakarias' helicopter, even his planes won't work. Is there a lua function or something that's recurring for making the helicopters go up that might be conflicting with something? I can't even begin to imagine what it might be.
I really want to use your helicopter, and so does every single person in my community. Other helos just don't cut it. The server relies on realistic tactical combat, not the "big brother's Call of Duty" junk polluting the mainstream today. We're about to go live but I'm having trouble without being able to use your airships. The videos are amazing and your scripting is probably some of the best I've seen. I apologize for being brash and I hope you'll accept the apology, I was a bit irritable earlier today.
Edited:
I did turn the one bar up to two and tried re-binding the key. Nobody in the server can get it to work - we can turn on the engine, shoot it, and so on.
Please, could you try and find what it is your helicopter utilizes to get into the air in Sakarias' code?
http://www.garrysmod.org/downloads/?a=view&id=84091
The file is there.
Or, wait, what is the slider that says "raise this" controlling? Is there a concommand? I can try doing it through rcon to see if it works then.
Edited:
Found it! wac_heli_phmul set to 2 and it takes off! Yesss!
This helicopter will be the source of endless entertainment.
I am going to walk away before this starts a flame war.
Anyway, Welt, I truly love your helicopters. Great job.
Hey, 4 new posts and 2 of them made me feel good when reading them.
I have no idea why I did not find this earlier. These helicopters are absolutely amazing. It would be nice if there could be a blur effect once the rotor is up to speed, my fps sometimes causes the blades to freeze in place. Other than that I'm really enjoying these helicopters, they fly so beautifully.
Would it be possible for the helicopter to set mat_motion_blur_forward_enabled to 0 while in it, then reset it when you get out? I like having motion blur on, but when you're in the helicopter it doesn't look right, because source uses overlay motion blur instead of per-object, so the helicopter itself blurs.
Welt, you are a lua god! it's amazing how it feels to fly! But i have a suggestion: Can you make a sort of tank and a sort of battel tank? With this base it's going to be absolutely legendary!
Again, really, really, grate job!
(Sorry for my english, i'm a sweed)
He made a tank track entity and some turrets, all YOU need to do is make the tank.
Weltensturm, if you're still working on this, I've got a hacked apart Osprey for you.
PM me on Facepunch or on Steam. I probably won't remember to check this thread until it's too late.
That Ka-50 (the better version) from NeuroPlanes looks pretty good. If nobody minds, I might convert it to WAC.
The user-made garrysmod.com helicopters should be implemented to the svn no? Would be very helpful at the least.
Weltensturm, what exactly is it that causes wac_heli_phmul to be necessary for some people? I'm trying to fix Sakarias' jets on my server and since they have the same problem maybe it could be remedied if I found a way to plug your code into his script or something.
I don't know what causes it, else I would have fixed it directly or atleast made a script that fixes it automatically.
The "Raise this" slider basically multiplies all physical force applied to everything (angle and directional velocity) which seems to balance it out again. I apply it directly in the PhysicsUpdate function, so there is no "easy way" to port it to sakarias stuff without editing his code.
Okay, working on the Ka-50. The top rotor works fine, but the bottom one wants to spin on a y-axis, instead of an x-axis. I need to add wheels and the cannon, too. Welt, if you can give me any help, that would be nice. I'm kind of a novice at coding. If you need, I can PM you the code.
I wouldn't imagine he'd mind if his code was edited, especially if it was a fix that otherwise would disable the majority of players from even using his addon.
I might need to create a seperate Counter-Rotating Rotor base so that the rotors will be fixed.
You can copy the whole ENT:PhysicsUpdate(ph) function from the base helicopter entity into your init.lua and change the part where it rotates the "rear" rotor. Function is AddAngleVelocity, and if you want to spin something around the Z axis (as you probably want) you'll have to make it (0,0,x).
Now the bottom rotor just sits there as if constrained and nocollided to the fuselage. It doesn't turn when activated.
Whoops, I forgot that you'll have to edit the angle constraint too.
Copy AddRotor and changetoconstraint.Axis(self.Entity, self.BackRotor, 0, 0, self.BackRotorPos, Vector(0,1,0),0,0,0.01,1)constraint.Axis(self.Entity, self.BackRotor, 0, 0, self.BackRotorPos, Vector(0,0,1),0,0,0.01,1)
Works, but now the bottom rotor spins insanely faster than the top, and may sometimes start spinning upon spawn.
I think it has something to do with local brake.
Well you could just delete all the BackRotor stuff from physicsupdate and instead copy the line that applies force to the main rotor and change it to BackRotor, inverted of course.
I tried to do that with local brake, but that just made it worse. :3
Someone needs to port the WZ-11, EuroCopter, Z-10, Z-11 (I think) transport, Chinook, Huey, etc from Project Reality and Battlefield 2 and WAC-ify them.
If this doesn't work I won't help you, else you'll never learn it.function ENT:PhysicsUpdate(ph) if self.LastPhys==CurTime() then return end local vel = ph:GetVelocity() local pos=self:GetPos() local ri=self:GetRight() local up=self:GetUp() local fwd=self:GetForward() local ang=self:GetAngles() local dvel=vel:Length() local lvel=self:WorldToLocal(pos+vel) if !self.Lock then local realism=2 if self.Passenger[1] and self.Passenger[1]:IsValid() and self.Passenger[1]:IsPlayer() then self.yawMul = self:GetPLControl(self.Passenger[1], WAC_HELI_LEANP, self.yawMul) self.rollMul = self.BackRotor and self:GetPLControl(self.Passenger[1], WAC_HELI_LEANY, self.rollMul) or 0 self.pitchMul = self:GetPLControl(self.Passenger[1], WAC_HELI_LEANR, self.pitchMul) self.upMul = self:GetPLControl(self.Passenger[1], WAC_HELI_UPDOWN, self.upMul, true) realism=math.Clamp(tonumber(self.Passenger[1]:GetInfo("wac_cl_heli_realism")),1,3) else self.yawMul=0 self.rollMul=0 self.pitchMul=0 end local angbrake=((self.TopRotor and self.BackRotor) and ph:GetAngleVelocity()*self.AngBrakeMul/math.pow(realism,2)*9 or NULLVEC) local t=self:CalculateHover(ph,pos,vel,ang) local phm=WAC.Helicopter.CVars.PHM:GetFloat() if self.UsePhysRotor then if self.TopRotor and self.TopRotor.Phys and self.TopRotor.Phys:IsValid() then if self.RotorBlurModel then self.TopRotorModel:SetColor(255,255,255,math.Clamp(1.3-self.startMul,0.1,1)*255) end local downvel = self.TopRotor:WorldToLocal(self.TopRotor:GetVelocity()+self.TopRotor:GetPos()).z local brake = (math.abs(self.pitchMul)+math.abs(self.yawMul)+math.abs(self.rollMul))*0.01 brake=brake+downvel*(self.upMul+1)*self.startMul/900+math.Clamp(math.abs(self.TopRotor.Phys:GetAngleVelocity().z/100),0,1)--self.upMul*self.startMul/3 self.TopRotor.Phys:AddAngleVelocity(Vector(0,0,-brake)*self.TopRotorDir) self.startMul = math.Clamp(self.TopRotor.Phys:GetAngleVelocity().z/2600*self.TopRotorDir*phm,-1,1) if self.Active and self.TopRotor:WaterLevel() <= 0 then self.engineStart=math.Clamp(self.engineStart+FrameTime()*0.1*WAC.Helicopter.CVars.SSpeed:GetFloat(),0,1) self.TopRotor.Phys:AddAngleVelocity(Vector(0,0,math.pow(self.engineStart,2)*16)*self.TopRotorDir) else self.engineStart = math.Clamp(self.engineStart-FrameTime()*0.16*WAC.Helicopter.CVars.SSpeed:GetFloat(), 0, 1) end local mind = (100-self.TopRotor.fHealth)/100 ph:AddAngleVelocity(VectorRand()*self.startMul*mind*phm) if self.BackRotor and self.BackRotor:IsValid() and self.BackRotor.Phys:IsValid() then local brake2 = (math.abs(self.pitchMul)+math.abs(self.yawMul)+math.abs(self.rollMul))*0.01 brake2=brake2+downvel*(self.upMul+1)*self.startMul/900+math.Clamp(math.abs(self.BackRotor.Phys:GetAngleVelocity().z/100),0,1)--self.upMul*self.startMul/3 self.TopRotor.Phys:AddAngleVelocity(Vector(0,0,brake)*self.TopRotorDir*-1) else ph:AddAngleVelocity(Vector(0,0,0-self.startMul*self.TopRotorDir)+ph:GetAngleVelocity()*0.01*phm) ph:AddAngleVelocity(VectorRand()*self.startMul*mind*phm) if !self.Sound.CrashAlarm:IsPlaying() then self.Sound.CrashAlarm:Play() end end local temp=vel+up*(self.upMul*self.startMul*1.7*self.EngineForce/25+self.startMul*9)*phm temp=temp-self:LocalToWorld(lvel*self.AirResistanceMods[4]*dvel/1000)+pos ph:SetVelocity(temp) for _,e in pairs(self.Wheels) do if ValidEntity(e) then local ph=e:GetPhysicsObject() if ph:IsValid() then local lpos=self:WorldToLocal(e:GetPos()) e:GetPhysicsObject():AddVelocity(Vector(0,0,9)+self:LocalToWorld(Vector(0,0,lpos.y*(self.pitchMul+t.r)/math.pow(realism,1.3)*4.17-lpos.y*angbrake.x)/4)-pos) e:GetPhysicsObject():AddVelocity(up*ang.r*lpos.y/self.WheelStabilize) end end end elseif self.BackRotor and self.BackRotor:IsValid() and self.BackRotor.Phys:IsValid() then ph:AddAngleVelocity((ph:GetAngleVelocity()*0.01+Vector(0,0,self.BackRotor.Phys:GetAngleVelocity().y/300))*self.startMul) end else self.startMul=math.Approach(self.startMul, self.Active and 1 or 0, self.EngineForce/1000) ph:SetVelocity(vel*0.999+(up*self.startMul*(self.upMul+1)*7 + (fwd*math.Clamp(ang.p*0.1, -2, 2) + ri*math.Clamp(ang.r*0.1, -2, 2))*self.startMul)*phm) end ph:AddAngleVelocity((Vector((self.pitchMul*1.5+t.r)*self.startMul, (self.yawMul+t.p)*self.startMul, self.rollMul*1.5*self.startMul)/math.pow(realism,1.3)*4.17-angbrake+(lvel.x*self.AirResistanceMods[1]+lvel.y*self.AirResistanceMods[2]+lvel.z*self.AirResistanceMods[3])*dvel/1000)*phm) for k,s in pairs(self.SeatsT) do if s.wep[s.wep_act].Phys and ValidEntity(self.Passenger[k]) then s.wep[s.wep_act].Phys(self,s.wep[s.wep_act],self.Passenger[k]) end end end if self.CustomPhysicsUpdate then self:CustomPhysicsUpdate(ph) end self.LastPhys=CurTime() end
And if it does, I want you to think about why it works and what exactly was changed.