Data Realms Fan Forums http://45.55.195.193/ |
|
2D with 3D elements http://45.55.195.193/viewtopic.php?f=1&t=25745 |
Page 1 of 1 |
Author: | Caithloki [ Fri Oct 07, 2011 4:51 am ] |
Post subject: | 2D with 3D elements |
Is there a way to make a weapon have a miss ratio if the bullets hit the actor. kinda make it so people are more likely to miss a direct shot because the bullet was to far to the background or foreground of the target. Example of what im thinking is you have two targets one a dummy or a colaltion soldier. The dummy would have a 35% miss ratio for direct hits well a soldier would have 20% because he was a bigger target. I find it would simulate the 3rd dimension into this 2 dimension game. Sorry if i put this in the wrong fourm and if i make no sense |
Author: | ThorWedd [ Fri Oct 07, 2011 7:41 am ] |
Post subject: | Re: 2D with 3D elements |
Might be able to do it Via Script, just have a bullet that changes into a Non-Hitting depending on Weapon (Would be Simple'st) and then maybe further depending on the Objects in the way "Class" |
Author: | XavierStudios [ Fri Oct 07, 2011 7:42 pm ] |
Post subject: | Re: 2D with 3D elements |
This is the right forum, don't worry. As for this concept, it wouldn't be very balanced because automatic fire from an AK-47 is fairly inaccurate in it's own right. Adding in chance is not something you want to do as it'll just make it even more difficult for you. |
Author: | ThorWedd [ Sat Oct 08, 2011 6:39 am ] |
Post subject: | Re: 2D with 3D elements |
Just saying, It would be balanced and would add a bit more Depth and reason to by a Coalition Assault rifle Over a Ak-47, Simply as it would Theoretically be a more Accurate rifle If you wanted to go overboard, then Maybe even have the 3 dot Aim line kinda light-up? (Just a Random Idea) from left to right to signify if the Bullets gonna hit, Left or right I dont know scripting in CC, but For a basic script would only need to check if 'WeaponTypeA' has shot and spawn Projectile based on & chance (Either a Non-Hit or a Hitting Projectile) |
Author: | akblabla [ Sat Oct 08, 2011 8:27 am ] |
Post subject: | Re: 2D with 3D elements |
First off giving a constant 30% miss chance doesn't simulate 3d spread at all, what you want is to start with a fx. 10%*the diameter of the target (This is the only size describing variable we got access to through lua, and I think it describes pretty well how far it goes into the third dimension) hit chance then multiply it with distance^-2 I made something like this before, for personal use. It isn't hard really. I could remake it after the weekend if ya want ^^ |
Author: | Xery [ Sat Oct 08, 2011 2:31 pm ] |
Post subject: | Re: 2D with 3D elements |
akblabla wrote: First of giving a constant 30% miss chance doesn't simulate 3d spread at all, what you wan't is to start with a fx. 10%*the diameter of the target (This is the only size describing variable we got access to through lua, and I think it describes pretty well how far it goes into the third dimension) hit chance then multiply it with distance^-2 I made something like this before, for personal use. It isn't hard really. I could remake it after the weekend if ya want ^^ Agree. Really simple by using random variable and SetWhichMOToNotHit. |
Author: | akblabla [ Sat Oct 08, 2011 4:09 pm ] |
Post subject: | Re: 2D with 3D elements |
Attach this script to any bullet and it should hopefully work Code: function Create(self) self.Spread = 0.0001; for i = 1,MovableMan:GetMOIDCount()-1 do self.object = MovableMan:GetMOFromID(i); if self.object ~= nil then if math.random(0,100) > self.object.Diameter / SceneMan:ShortestDistance(self.object.Pos,self.Pos,SceneMan.SceneWrapsX).Magnitude^2 / self.Spread then print(i) self:SetWhichMOToNotHit(self.object,-1); end end end end Fiddle around with the self.Spread variable until it fits what you desire, current the spread makes it miss 90% of the shots at 1000 pixels which obviously is a bit overkill. Hope it helps |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |