Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   One Unlinked Skill (http://forums.wolflair.com/showthread.php?t=64871)

Tickkid October 5th, 2020 08:51 PM

One Unlinked Skill
 
Hi everyone,

I'm working on a game that has one skill that is unlinked. I've figure out how to tell the game that the linkage is optional - but I'm not sure exactly how to keep the net skill roll to keep the linked skill in all of the rest of the attributes except for the one unlinked one. I'm pretty sure it's a nested if. I'm thinking I could reference the skill directly in the IF even, but I'm just not sure the syntax to say that if it is this skill then @value = field[trtFinal].value instead of @value = field[trtFinal].value + linkage[attribute].field[trtFinal].value

TCArknight October 5th, 2020 09:12 PM

Quote:

Originally Posted by Tickkid (Post 291169)
Hi everyone,

I'm working on a game that has one skill that is unlinked. I've figure out how to tell the game that the linkage is optional - but I'm not sure exactly how to keep the net skill roll to keep the linked skill in all of the rest of the attributes except for the one unlinked one. I'm pretty sure it's a nested if. I'm thinking I could reference the skill directly in the IF even, but I'm just not sure the syntax to say that if it is this skill then @value = field[trtFinal].value instead of @value = field[trtFinal].value + linkage[attribute].field[trtFinal].value

I would think you could give the skill a tag like SkillLink.Unlinked and like you thought, if the tag is present, add the linkage value, otherwise just use the skill trtFinal value.

That way, if for some reason more skills that are unlinked come into play, you’re already accounting for it.

Tickkid October 5th, 2020 09:22 PM

Quote:

Originally Posted by TCArknight (Post 291170)
I would think you could give the skill a tag like SkillLink.Unlinked and like you thought, if the tag is present, add the linkage value, otherwise just use the skill trtFinal value.

That way, if for some reason more skills that are unlinked come into play, you’re already accounting for it.

Thank you, this is a good idea. Time to dive into some Tag and Tag groups. Really appreciate the response.

TCArknight October 6th, 2020 04:55 AM

Quote:

Originally Posted by Tickkid (Post 291171)
Thank you, this is a good idea. Time to dive into some Tag and Tag groups. Really appreciate the response.

Very welcome :)

Mathias October 6th, 2020 07:26 AM

I'd do:

Code:

@value += field[trtFinal].value

if (islinkage[attribute] <> 0) then
  @value += linkage[attribute].field[trtFinal].value
    endif


That way, you don't need to do two steps (leaving out the linkage and setting the tag) to mean the same thing in two different places.


All times are GMT -8. The time now is 08:20 AM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.