ABCoLD Posted February 18, 2006 Share Posted February 18, 2006 I'm slamming my head up against a wall here when it comes to conditionals in TSL. I'm trying to edit a dlg file so that a specific line option only is invoked when a character (handmaiden) is of a specific level (11, 13, etc. As I am a simpleton, I can't figure out if the game has a conditional in place already that you can use to check for level on characters or not. Nor how to create a new one if it doesn't. Anyone able to help me out here? Link to comment Share on other sites More sharing options...
stoffe Posted February 18, 2006 Share Posted February 18, 2006 I'm slamming my head up against a wall here when it comes to conditionals in TSL. I'm trying to edit a dlg file so that a specific line option only is invoked when a character (handmaiden) is of a specific level (11, 13, etc. As I am a simpleton, I can't figure out if the game has a conditional in place already that you can use to check for level on characters or not. Nor how to create a new one if it doesn't. Don't know if there are any existing ones, but this should work: int StartingConditional() { return (GetHitDice(OBJECT_SELF) >= GetScriptParameter(1)); } Set the first dialog node parameter of the conditional script (P1 in the DLGEditor) to the level the dialog owner should at least be for the node to display. * * * If the character you wish to check isn't the one who the dialog was started with, you can use something like this instead: int StartingConditional() { object oCheck = GetFirstPC(); string sTag = GetScriptStringParameter(); if (sTag != "") oCheck = GetObjectByTag(sTag); if (!GetIsObjectValid(oCheck)) return FALSE; return (GetHitDice(oCheck) >= GetScriptParameter(1)); } Set the first dialog node parameter (P1) to the level to check against, and the String Param (still in the DLGEditor) to the Tag of the NPC to check (or leave blank to check the main character). Link to comment Share on other sites More sharing options...
ABCoLD Posted February 18, 2006 Author Share Posted February 18, 2006 Thanks, I'll try to decipher that later. I have this toothache, and it makes trying to figure this stuff out almost impossible. Very hard to concentrate. But I do appreciate it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.