1. Post #481
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    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.

  2. Post #482
    ultradude25's Avatar
    June 2008
    1,521 Posts
    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.
    Reply With Quote Edit / Delete Reply Australia Show Events Agree Agree x 1 (list)

  3. Post #483
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    I wish we could have this without having the base.
    Reply With Quote Edit / Delete Reply United States Show Events Disagree Disagree x 3Agree Agree x 1 (list)

  4. Post #484
    Gold Member
    teh pirate's Avatar
    March 2009
    5,305 Posts
    Is there a "switch" somewhere that I can change to remove rotor damage altogether?

  5. Post #485
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    Is there a "switch" somewhere that I can change to remove rotor damage altogether?
    Nope, don't think there is.

  6. Post #486
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    I wish we could have this without having the base.
    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?
    Reply With Quote Edit / Delete Reply United States Show Events Disagree Disagree x 5Agree Agree x 2 (list)

  7. Post #487
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    I didn't add the ability to disable all scripts in the base to separate everything again.

  8. Post #488
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    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?
    No, because the base is awesome.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)

  9. Post #489
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    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 didn't add the ability to disable all scripts in the base to separate everything again.
    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.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 2Disagree Disagree x 1 (list)

  10. Post #490
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    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/

  11. Post #491
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    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?
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)

  12. Post #492
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    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.
    You, sir (or madam), are very disrespectful. I can have an opinion without being labeled a fascist.
    Reply With Quote Edit / Delete Reply United States Show Events Disagree Disagree x 1Agree Agree x 1 (list)

  13. Post #493
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    You don't even know the meaning of the word respect, you hypocrite.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 2 (list)

  14. Post #494
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    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.
    Reply With Quote Edit / Delete Reply Austria Show Events Agree Agree x 1 (list)

  15. Post #495
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    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.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)

  16. Post #496
    ultradude25's Avatar
    June 2008
    1,521 Posts
    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.
    Reply With Quote Edit / Delete Reply Australia Show Events Funny Funny x 1 (list)

  17. Post #497
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    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.
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 1 (list)

  18. Post #498
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    You don't even know the meaning of the word respect, you hypocrite.
    I am going to walk away before this starts a flame war.

    Anyway, Welt, I truly love your helicopters. Great job.

  19. Post #499
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    Hey, 4 new posts and 2 of them made me feel good when reading them.

  20. Post #500
    Gold Member
    muffinmastah's Avatar
    November 2010
    911 Posts
    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.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)

  21. Post #501
    ultradude25's Avatar
    June 2008
    1,521 Posts
    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.
    Reply With Quote Edit / Delete Reply Australia Show Events Agree Agree x 1 (list)

  22. Post #502
    lolrazz's Avatar
    January 2008
    70 Posts
    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)

  23. Post #503
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    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.

  24. Post #504
    Gold Member
    teh pirate's Avatar
    March 2009
    5,305 Posts
    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.

  25. Post #505
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    That Ka-50 (the better version) from NeuroPlanes looks pretty good. If nobody minds, I might convert it to WAC.

  26. Post #506
    Ashin's Avatar
    June 2010
    58 Posts
    The user-made garrysmod.com helicopters should be implemented to the svn no? Would be very helpful at the least.
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)

  27. Post #507
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    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.

  28. Post #508
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    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.

  29. Post #509
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    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.

  30. Post #510
    Gold Member
    Kung Fu Jew's Avatar
    November 2006
    5,681 Posts
    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.

  31. Post #511
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    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.

  32. Post #512
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    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.
    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).
    Reply With Quote Edit / Delete Reply Austria Show Events Lua Helper Lua Helper x 1 (list)

  33. Post #513
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    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.

  34. Post #514
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    Whoops, I forgot that you'll have to edit the angle constraint too.
    Copy AddRotor and change
    constraint.Axis(self.Entity, self.BackRotor, 0, 0, self.BackRotorPos, Vector(0,1,0),0,0,0.01,1)
    to
    constraint.Axis(self.Entity, self.BackRotor, 0, 0, self.BackRotorPos, Vector(0,0,1),0,0,0.01,1)
    Reply With Quote Edit / Delete Reply Austria Show Events Lua Helper Lua Helper x 1 (list)

  35. Post #515
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    Whoops, I forgot that you'll have to edit the angle constraint too.
    Copy AddRotor and change
    constraint.Axis(self.Entity, self.BackRotor, 0, 0, self.BackRotorPos, Vector(0,1,0),0,0,0.01,1)
    to
    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.

  36. Post #516
    _WEEGEE_'s Avatar
    September 2010
    413 Posts

  37. Post #517
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    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.

  38. Post #518
    _WEEGEE_'s Avatar
    September 2010
    413 Posts
    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

  39. Post #519
    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.

  40. Post #520
    Gold Member
    WeltEnSTurm's Avatar
    December 2007
    1,874 Posts
    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
    If this doesn't work I won't help you, else you'll never learn it.
    And if it does, I want you to think about why it works and what exactly was changed.
    Reply With Quote Edit / Delete Reply Austria Show Events Lua Helper Lua Helper x 1 (list)