Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - d20 System (http://forums.wolflair.com/forumdisplay.php?f=46)
-   -   doneif class skill (http://forums.wolflair.com/showthread.php?t=68100)

Spyderbane November 16th, 2023 08:46 AM

doneif class skill
 
1 Attachment(s)
How can I perform an action if a skill is a class skill?
I was looking at adding this directly in a custom skill

Code:

doneif (field[kClass].value <> 0)
but this throws an error
http://forums.wolflair.com/attachmen...1&d=1700156469

Any suggestions? I'm trying to add bonus points if it is a class skill.

Full code
Code:

doneif (field[kClass].value <> 0)
var nPoints as number
nPoints = (#totallevelcount[] * 5)
field[Bonus].value += nPoints


Sendric November 16th, 2023 09:17 AM

Class skills are determined by the class, not by the skill or even the hero. So, you'll need to look at all the classes to determine if it's a class skill.

Do you want it to be a class skill for a specific class or for any class? For any class, you might try something like this:

Code:

var classskill as number
foreach pick in hero from BaseClHelp where "BaseSkill.nen2"
  classskill += 1
nexteach
doneif (classskill = 0)

I assumed "nen2" is the thingid of your skill based on the error message. If not, put the thingid of the skill in question in its place.


All times are GMT -8. The time now is 12:00 PM.

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