Skip to content

Script question(Text above head/adding sounds)

justcanadianjustcanadian Member Posts: 3
edited September 2012 in General Modding
As the title says, I'm creating a cutscene script and am trying to add the floating text over player 1, as well as some Irenicus sounds to the script. I've looked all day through various guides, but none have helped me. Are there a couple lines I could add into my script to make things work?

It looks like:

IF
True()
THEN
RESPONSE #100
CutSceneID(myself)
Wait(1)
Spell(NearestEnemyOf(Myself),3782)
Wait(1)
Spell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
Spell(SecondNearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
Wait(1)
Spell(NearestEnemyOf(Myself),3781)
Spell(SecondNearestEnemyOf(Myself),3782)
EndCutSceneMode()
END

It's pretty much me just screwing around and throwing in anything I can. I was hoping I could just let the cinematic run until all enemies on the screen are dead, but it's silly like that. I don't even know where to get the Irenicus sounds >.> any help would be very appreciated.

Comments

  • cmorgancmorgan Member Posts: 707
    DisplayStringHead(Myself,~Oooooh! Pretty! A Magic Missile!~)

    If you just want it in the feedback/dialog window instead of onscreen,

    DisplayString(Myself,~Oooooh! Pretty! A Magic Missile!~)

    To keep casting everything you have until spells are exhausted/everyone is dead, you would need to start dealing with heavier AI scripting.


    http://iesdp.gibberlings3.net/scripting/actions/bg2actions.htm
  • justcanadianjustcanadian Member Posts: 3
    edited September 2012
    Thanks a lot, I would have NEVER found that :D

    Edit: I went back through and located how to add in the sound AND the text. Maaaaaan that was so fulfilling!
    Post edited by justcanadian on
  • KharlogKharlog Member Posts: 5
    edited December 2012
    DisplayStringHead is not compiling for me. I get following error:

    Action:DisplayStringHead Not found. Check for proper brackets.

    How did you manage to get it working? What compiler are you using?
  • horredtheplaguehorredtheplague Member, Developer Posts: 186
    @Kharlog -- @cmorgan is using weidu, by the looks of that script line. Most editors can only handle STRREF numbers, not the ~I said this~ style of dialect. Which, is why you got an error. Also, if I recall he's a weidu-using kinda guy. :)

    Weidu will work (and the only one that will with the funny tilde/bracket dialog), but it requires command line entries or a tp2 script.

    You can also compile in NearInfinity. Or in DLTCEP if you set it to a weidu path in setting options. Or, with AIcompile.exe from BG2 days--Brent Knowles' release, along w/ a simple GUI-style scripting editor--still available on File Planet last I knew. I've used all of the above with success, in BGEE.

    But only weidu will add the custom dialog strings neatly. This is where you must make a choice. Does the in-game tlk file have what you're looking for, or very close to it? If so, you can just recycle that resref entry (the string's number in a tlk editor). e.g:
    DisplayStringHead(Myself,25821) // True Sight
    Any compiler can handle the above, and you won't have to worry about overwriting your tlk file--or the big procedure that involves at the moment.
  • EcthelionEcthelion Member Posts: 61
    edited May 2013
    Sorry for digging up older posts, but this one is really close to what I want to ask! :p

    I have a little question about DisplayStringHead(Myself,~string~), is it possible to use it with a .tra file?

    Ex : DisplayStringHead(Myself, @ 10)

    And in my .tra file : @ 10 = ~Nice!~

    For dialog files I just need to add the following in my .tp2:
    COMPILE dialog.d
    USING strings.tra

    But for scripts I get an error telling me that '@10' is not found
    COMPILE script.baf
    USING strings.tra

    I want to have all strings (dialogs & script) in my strings.tra file in order to enable easier translation (and correction) of my mod.

    Thanks!

    EDIT : There is no problem, just a newbie mistake I solved. Sorry.
    Post edited by Ecthelion on
Sign In or Register to comment.