|
FAQ
• Search • Login
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Author |
Message |
Caithloki
Joined: Fri Oct 07, 2011 4:42 am Posts: 1
|
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
|
Fri Oct 07, 2011 4:51 am |
|
|
ThorWedd
Joined: Tue Aug 16, 2011 5:11 am Posts: 7 Location: Auckland, NewZealand
|
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"
|
Fri Oct 07, 2011 7:41 am |
|
|
XavierStudios
Joined: Tue Feb 08, 2011 4:14 am Posts: 59
|
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.
|
Fri Oct 07, 2011 7:42 pm |
|
|
ThorWedd
Joined: Tue Aug 16, 2011 5:11 am Posts: 7 Location: Auckland, NewZealand
|
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)
|
Sat Oct 08, 2011 6:39 am |
|
|
akblabla
Joined: Wed May 20, 2009 3:10 pm Posts: 366 Location: Århus, Denmark
|
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 ^^
Last edited by akblabla on Sat Oct 08, 2011 3:41 pm, edited 1 time in total.
|
Sat Oct 08, 2011 8:27 am |
|
|
Xery
Joined: Sat Feb 26, 2011 10:29 am Posts: 163
|
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.
|
Sat Oct 08, 2011 2:31 pm |
|
|
akblabla
Joined: Wed May 20, 2009 3:10 pm Posts: 366 Location: Århus, Denmark
|
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
|
Sat Oct 08, 2011 4:09 pm |
|
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|