Author |
Message |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 01/07/2006 05:49:02
|
Drago'Nish
Dominating
Joined: 08/10/2005 18:38:46
Messages: 205
Offline
|
how do i make a check on a ability level within another ability ?
(example: loaded weapons requires regen level 2 instead of just regen)
|
Zenas: Weapons Master - lvl 26 |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 01/07/2006 09:15:13
|
Tidu!
Dominating
![[Avatar]](/dcforum/images/avatar/c51ce410c124a10e0db5e4b97fc2af39.png)
Joined: 12/20/2004 14:32:15
Messages: 231
Location: Hatboro, PA
Offline
|
I've had loaded weapons for about 15 levels now, and I just got regen two about 2 levels ago. You sure you're meeting all the requirements?
|
===============
this is tidu
Thanks to KohanX for the avatar  |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 01/07/2006 09:26:00
|
TheDruidXpawX
Wicked Sick!
![[Avatar]](/dcforum/images/avatar/eccbc87e4b5ce2fe28308fd9f2a7baf3.jpg)
Joined: 12/19/2004 18:32:13
Messages: 1946
Offline
|
the RPGPlayerDataObject passed into Cost has two arrays that are "Paired"
The first array is a list of skills, the second array is a list of levels associated with those skills...
So you can iterate through the array and find the skill you're looking for, and then check for the same index in the levels array and see what the value of that int is.
Dru
|
Skin download: http://www.disastrousconsequences.com/dcforum/posts/list/1189.page
The fundamental problem is this: The first word we learn as children is NO. From that point forward society teaches women that saying no isn't polite, and society teaches men to respect those who wont take no for an answer.
The world is what you make of it, my friend. If it doesn't fit, you make alterations. -- Stella, The Morning Star |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 01/07/2006 10:09:36
|
Drago'Nish
Dominating
Joined: 08/10/2005 18:38:46
Messages: 205
Offline
|
Tidu! wrote:
I've had loaded weapons for about 15 levels now, and I just got regen two about 2 levels ago. You sure you're meeting all the requirements?
i meant something in the code, not something from ingame.
Druid, thnx i'll try looking for it that way, IIRC it is something like AbilityLevel, but that dindt work.
AbilityLevel just isnt a Public int but a private.
|
Zenas: Weapons Master - lvl 26 |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 01/07/2006 14:03:46
|
Tidu!
Dominating
![[Avatar]](/dcforum/images/avatar/c51ce410c124a10e0db5e4b97fc2af39.png)
Joined: 12/20/2004 14:32:15
Messages: 231
Location: Hatboro, PA
Offline
|
lol whoops
|
===============
this is tidu
Thanks to KohanX for the avatar  |
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 01/07/2006 19:59:53
|
bushbomb
Killing Spree
Joined: 01/21/2005 14:06:46
Messages: 48
Offline
|
Drago'Nish wrote:
Tidu! wrote:
I've had loaded weapons for about 15 levels now, and I just got regen two about 2 levels ago. You sure you're meeting all the requirements?
i meant something in the code, not something from ingame.
Druid, thnx i'll try looking for it that way, IIRC it is something like AbilityLevel, but that dindt work.
AbilityLevel just isnt a Public int but a private.
Take a look at this code, this finds "quickfoot" ability and the other function is "if quickfoot level is > 1 then" which you can obviously change to 2 or whatever level you look for. Just as easily, you can change the ability you are looking for.
Code:
static function quickfoot(int localModifier, Pawn PawnOwner)
{
local int x;
local bool found;
local RPGStatsInv StatsInv;
StatsInv = RPGStatsInv(PawnOwner.FindInventoryType(class'RPGStatsInv'));
found = false;
for (x = 0; StatsInv != None && x < StatsInv.Data.Abilities.length; x++)
if (StatsInv.Data.Abilities[x] == class'AbilitySpeed')
{
found = true;
break;
}
if(!found)
ModifyPawnSpeed(PawnOwner, localModifier);
else
ModifyPawnSpeed(PawnOwner, StatsInv.Data.AbilityLevels[x] + localModifier);
}
static function ModifyPawnSpeed(Pawn Other, int AbilityLevel)
{
if(AbilityLevel >= 0)
{
Other.GroundSpeed = Other.default.GroundSpeed * (1.0 + 0.05 * float(AbilityLevel));
Other.WaterSpeed = Other.default.WaterSpeed * (1.0 + 0.05 * float(AbilityLevel));
Other.AirSpeed = Other.default.AirSpeed * (1.0 + 0.05 * float(AbilityLevel));
}
else
{
Other.GroundSpeed = Other.default.GroundSpeed / (1.0 + 0.05 * abs(AbilityLevel));
Other.WaterSpeed = Other.default.WaterSpeed / (1.0 + 0.05 * abs(AbilityLevel));
Other.AirSpeed = Other.default.AirSpeed / (1.0 + 0.05 * abs(AbilityLevel));
}
}
|
Server Admin
www.DAWGA.com
UT2004 RPG since 2004
|
|
 |
![[Post New]](/dcforum/templates/default/images/icon_minipost_new.gif) 01/08/2006 05:40:23
|
Drago'Nish
Dominating
Joined: 08/10/2005 18:38:46
Messages: 205
Offline
|
yes, that might be a solution.
i'll try it sometime this week. thnx.
|
Zenas: Weapons Master - lvl 26 |
|
 |
|