Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: plainab
« on: August 09, 2009, 06:24:07 PM »

I had something similar with an inlined script that was being extended to the bottom of a pre-existing script.

I solved it by using OUTER_SPRINT to define a variable and then putting that variable inside %'s inside ~'s and a EVALUATE_BUFFER after the EXTEND_BOTTOM line. It worked like a charm.

In your case, if you didn't want to mess with a tra file, you could try the following...

Code: [Select]
OUTER_SPRINT cut_text ~StartCutSceneMode being called~
COMPILE ~some.d~ //where your dialog file has ~%cut_text%~ instead of ~StartCutSceneMode being called~
 EVALUATE_BUFFER

Then again, .baf and .d can be handled differently by weidu so who knows for sure....

But it doesn't matter how you get it to work, so long as you get it to work. Of which it sounds like you already got something to work...

Posted by: zefklop
« on: August 09, 2009, 04:48:35 PM »

Thanks, I finally used tra files. Still, I was very surprised this did not work, and my work is really not intended to be translated.
Posted by: devSin
« on: August 05, 2009, 05:38:09 PM »

Use %s to enclose your TRA strings in .D actions. Or use TRA refs.
Posted by: zefklop
« on: August 05, 2009, 03:00:39 PM »

The problem is still there: weidu refuses to consider second argument of DisplayString as a string and fails with a sparsing error.

Posted by: cmorgan
« on: August 05, 2009, 02:44:14 PM »

Try a simplification that does not have as much chance of confusing WeiDU with all those nested string delimiters, something like
Code: [Select]
IF ~Global("starttest", "GLOBAL", 0)~ THEN BEGIN RunTest
   SAY ~Would you like to repeat the test?~
  IF ~~ THEN REPLY  ~Yes, I would. Cutscene test will begin now, please wait, length approximately 5 seconds~ DO ~ClearAllActions()
                 Wait(5)
                 SetGlobal("TestCutsceneRunning", "GLOBAL", 1)
                 DisplayString(Myself,~StartCutSceneMode being called~)
                 StartCutSceneMode()
                 Wait(5)
                 DisplayString(Myself,~StartCutScene Being called~)
                 StartCutScene("cuttest")~ EXIT
  IF ~~ THEN REPLY  ~No thank you. I do not wat to test any more. Set the global to 1 so I do not have it popping up all the time, please.~ DO ~SetGlobal("starttest", "GLOBAL", 1)~ EXIT
END

with the relevant cutscene cuttest

Code: [Select]
CutSceneID(Player1)
SetGlobal("TestCutsceneRunning", "GLOBAL", 0)
DisplayStringHead(Player1, ~Test global cleared so we can repeat the test~)
EndCutSceneMode()
StartDialogNoSet(Player1)

and see if that works -
Posted by: zefklop
« on: August 05, 2009, 02:26:39 PM »

Hi everybody!

As a code sample is sometimes more explicit...

Code: [Select]
IF ~NumTimesTalkedTo(0)~ THEN BEGIN RunTest
   SAY ~"Cutscene test will begin now, please wait, it will length approximately 5 seconds"~
   IF ~~ THEN DO ~ActionOverride("tester2",AttackNoSound("tester1"))
                 Wait(5)
                 SetGlobal("TestCutsceneRunning", "GLOBAL", 1)
                 DisplayString(Myself, "StartCutSceneMode being called")
                 StartCutSceneMode()
                 Wait(5)
                 DisplayString(Myself, "StartCutScene Being called")
                 StartCutScene("cuttest")~ EXIT
END

This one will compile with warnings, and the DiplayString action will display the strref #0
Enclosing the string with ~ will lead to a sparse error.

I don't know if this is feasible, but it would be nice to have this done correctly (meaning, adding a new strref and use it, as weidu does it usually)

As a workaround, if someone could tell me if this is possible to add a new strref from tp2 and stores its number in a variable, this would work too. (and yes, I know that I should use weidu more often)