[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
ability level check ?  XML
Forum Index -> Druids RPG
Author Message
Drago'Nish

Dominating
[Avatar]
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
Tidu!

Dominating
[Avatar]

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
[Email] aim icon [MSN]
TheDruidXpawX

Wicked Sick!
[Avatar]

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
Drago'Nish

Dominating
[Avatar]
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
Tidu!

Dominating
[Avatar]

Joined: 12/20/2004 14:32:15
Messages: 231
Location: Hatboro, PA
Offline

lol whoops

===============
this is tidu
Thanks to KohanX for the avatar
[Email] aim icon [MSN]
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
[WWW] [MSN]
Drago'Nish

Dominating
[Avatar]
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
 
Forum Index -> Druids RPG
Go to: