Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Level Scripting Question

Page: 1 of 1
 rgdelta
01-08-2006, 2:33 PM
#1
Ok I might have missed it but I was searching I need a script that determines what level the PC or Party memeber is like if the PC is level 15 Jedi Guardian and Level 10 Sith Lord I need to get that the PC is level 25 same with say atton say he is a Level 20 Scoundral and level 5 Jedi I need it to get him at level 25.
 stoffe
01-08-2006, 2:39 PM
#2
I need a script that determines what level the PC or Party memeber is like if the PC is level 15 Jedi Guardian and Level 10 Sith Lord I need to get that the PC is level 25 same with say atton say he is a Level 20 Scoundral and level 5 Jedi I need it to get him at level 25.

Use the GetHitDice() script function, it returns the total character level of the creature you specify as parameter.

How you use it depend on what you need the script for. Is it a conditional script for use in a dialog?

If so, something like this should work if you put the first parameter to the level the creature should at least be, and the string parameter to the Tag of the creature to check (or leave tag blank to check the player character):


int StartingConditional() {
int iLevel = GetScriptParameter(1);
string sTag = GetScriptStringParameter();
object oCreature = (sTag != "" ? GetObjectByTag(sTag) : GetFirstPC());

return (GetHitDice(oCreature) >= iLevel);
}
 rgdelta
01-08-2006, 2:59 PM
#3
Thanks Stoffe no it is a script conditional in a script but that gives me a great idea of what I need thanks.
Page: 1 of 1