1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Help with scripts

Discussion in 'BG2: Shadows of Amn (Classic)' started by Cryohydropyro, May 25, 2004.

  1. Cryohydropyro Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    May 25, 2004
    Messages:
    47
    Likes Received:
    0
    [​IMG] I'm writing my own scripts using NearInfinity. I found it quite easy but I can't figure out how to display message strings above my head like the one on the opening of the game("Ah, the child of Bhaal has awoken.").

    I attached a conditon that it should appear only when I see an enemy. I also attached a delay timer.

    I'll write the certain trigger below and please try to suggest some changes. BTW, I also added new strings to the dialog.tlk so there's actually no problem as to what message will appear.

    ------------
    IF
    See(NearestEnemyOf(Myself))
    Delay(2)
    THEN
    RESPONSE #100
    DisplayStringHead(Myself,63000) // Die, bloodsucker!
    END
    ------------

    I really don't know what's missing or what's wrong with it. I used the opening cinematic and the third dream in Chapter 2 as samples.

    Also, I was wondering how to make the message disappear. I'm afraid that once I see an enemy the message will hang over my head like a stupid placard.

    Thanks in advance. :D
     
  2. Rastor Gems: 30/31
    Latest gem: King's Tears


    Joined:
    Jul 8, 2002
    Messages:
    3,533
    Likes Received:
    0
    Remove Delay(2) from the conditionals. You don't really need it.

    Are you sure that's the right entry for the dialog.tlk?
     
  3. Cryohydropyro Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    May 25, 2004
    Messages:
    47
    Likes Received:
    0
    Yes it is. I added a lot of new entries to the dialog.tlk and made sure that the number corresponds to the right string. Anyway, I'll try what you suggested.

    Any experts out there, please help!

    Thanks!
     
  4. Rastor Gems: 30/31
    Latest gem: King's Tears


    Joined:
    Jul 8, 2002
    Messages:
    3,533
    Likes Received:
    0
    I just took a look at IESDP and that should work fine. There's actually nothing wrong with your code.

    I'm assuming you want your main character to say this? How exactly did you assign this block of code to him?
     
  5. Cryohydropyro Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    May 25, 2004
    Messages:
    47
    Likes Received:
    0
    What's IESDP? Is it a script writer? Anyway, I assigned it to my PC by editing the Standard Attack script(agen.bcs). I didn't complicate it much... Just added that line... But it still won't appear. I studied the scripts of both Kangaxx(demilich) and the Cowled Enforcers, as well as those of other CRE's, but the commands DisplayString and DisplayStringHead commands still wouldn't work.
     
  6. SimDing0 Gems: 9/31
    Latest gem: Iol


    Joined:
    Dec 3, 2002
    Messages:
    347
    Likes Received:
    2
    Where did you add your code to the existing script? If you put it at the bottom, the script flow isn't gonna get that far because there's an attacking block above it.
     
  7. Cryohydropyro Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    May 25, 2004
    Messages:
    47
    Likes Received:
    0
    Good news! I actually found out the answer! Silly me, I just discovered that when you add a string to the dialog.tlk you need to specify if it's a standard message! Otherwise, it wouldn't appear! Haha... That was quite stupid of me...

    Anyway, thanks... And SimDing0, I'm actually studying your guide right now... It's very helpful... :)
     
  8. SimDing0 Gems: 9/31
    Latest gem: Iol


    Joined:
    Dec 3, 2002
    Messages:
    347
    Likes Received:
    2
    Glad you're finding it useful.
     
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.