|
|
|
 |

April 20th, 2008, 08:16 AM
|
 |
Major General
|
|
Join Date: Jan 2004
Location: Germany / Bielefeld
Posts: 2,035
Thanks: 33
Thanked 18 Times in 12 Posts
|
|
Re: MOD: Space Empires V - Babylon 5
Regarding the weapon to hit modifier formula. How would i go about capping it at some point ?
I want a gun that gets a to hit bonus when being away from the target:
[%Range%] / 2
However, i want it to be capped at 25 or what.
|

April 20th, 2008, 01:00 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: MOD: Space Empires V - Babylon 5
If you look on page 53 of the modding doc, you will see some useful functions. Min is what you want in this case. It will return the smaller of the two values.
Min([%Range%] / 2, 25)
|

April 20th, 2008, 01:46 PM
|
 |
Major General
|
|
Join Date: Nov 2000
Location: 500km from Ulm
Posts: 2,279
Thanks: 9
Thanked 18 Times in 12 Posts
|
|
Re: MOD: Space Empires V - Babylon 5
Quote:
Fyron said:
Quote:
However, i want it to be capped at 25 or what.
|
If you look on page 53 of the modding doc, you will see some useful functions. Min is what you want in this case. It will return the smaller of the two values.
Min([%Range%] / 2, 25)
|
As he wants a cap, he would need a MAX function .. if there's any (dunno, never read that doc). ;-)
__________________
As for AI the most effective work around to this problem so far is to simply use an American instead, they tend to put up a bit more of a fight than your average Artificial Idiot.
... James McGuigan on rec.games.computer.stars somewhen back in 1998 ...
|

April 20th, 2008, 03:05 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Feb 2001
Location: Waterloo, Ontario, Canada
Posts: 11,451
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Re: MOD: Space Empires V - Babylon 5
Max would provide a minimum value. (It never goes below X)
Max( X , SomeValue) Returns the bigger of the two.
Min provides a maximum value. (It never goes above X)
Min( X , SomeValue) Returns the smaller of the two.
__________________
Things you want:
|

April 20th, 2008, 05:01 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Jul 2001
Location: Southern CA, USA
Posts: 18,394
Thanks: 0
Thanked 12 Times in 10 Posts
|
|
Re: MOD: Space Empires V - Babylon 5
Arralen said:
"As he wants a cap, he would need a MAX function .. if there's any (dunno, never read that doc)."
Ah, the trap of function naming. Catches up everyone when they first think about using Min and Max functions. Gotta love reverse logical thinking. 
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|