Skip to content

DLG files and Running Commands

CorsymyrCorsymyr Member Posts: 146
edited March 2013 in General Modding
Is this even possible? It seems that I am unable to get "PLAYER1" to perform any action from a DLG file. I know how to get it to work in a Script (BCS). Maybe DLG files don't allow such commands?

IF ~Gender(Player1,MALE)~ DO ~ActionOverride("PLAYER1",Polymorph(MAGE_MALE_ELF))~

or

IF ~~ THEN DO ~GiveItemCreate("PWING2",PLAYER1,1,0,0)~ DO ~ActionOverride("PLAYER1",UseItem("PWING2",PLAYER1))~

In the second one it creates the item, but "Player1" refuses to use the item (potion).

TIA

Comments

  • WispWisp Member Posts: 1,102
    The conventional approach is to start a cutscene, exit the dialogue and optionally resume dialogue at the end of the cutscene.
    There's probably something with the DLG action queue that disallows ActionOverride().
  • CorsymyrCorsymyr Member Posts: 146
    @Wisp Thanks ... stragely enough no matter the methodolgy, (be it an AREA.BCS, or a DLG) I cannot get the "player1" or "myself" to drink a potion via DLG or an Area BCS. It seems so odd, and I think I am only missing one piece to the puzzle.

    Thanks for attempting to assist.
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    Some things are cas sensitive in the game, such as the CLUA console, and I believe that scripts and action blocks in dialogs are. You should pay attention how you write things. Player1, PLAYER1 and player1 are different when things are case sensitive. In your example, you never wrote "Player1" or "Myself" in the action block that fails, while this is how they are written in OBJECT.IDS.
    In this script tutorial, the only time case sensitivity is mentionned is when something is not case sensitive, and it seems to imply that it's an exception.
  • LiamEslerLiamEsler Member Posts: 1,859
    DO ~ActionOverride("PLAYER1",Polymorph(MAGE_MALE_ELF))~

    Won't work, because there's no "PLAYER1" dv. The correct version would be:

    DO ~ActionOverride(PLAYER1,Polymorph(MAGE_MALE_ELF))~

    and same for your other example--plus, you should string your actions together:

    IF ~~ THEN DO ~GiveItemCreate("PWING2",PLAYER1,1,0,0) ActionOverride(PLAYER1,UseItem("PWING2",PLAYER1))~
Sign In or Register to comment.