I am having problem with this macro event...

Chris H.'s Ultima / ACS-style game development system!

Moderators: Ice Cream Jonsey, joltcountry

foody
Posts: 35
Joined: Tue Apr 24, 2007 1:56 pm

I am having problem with this macro event...

Post by foody »

I have the following macro code #13:

1: IF A = 0 THEN 2
2: LMSG 4
3: STOP
4: IF A = 1 THEN 5
5: LMSG 5
6: STOP

at the dialog box for an NPC at the (INTRO) topic under response:

MACRO #13

I have set variable A to be 0 at the begging of the game where the player pass by it, it set variable A = 0. When I speak with the NPC all I get is a black screen no long message even though LMSG 4 AND 5 is filled with text. Any help here? Thanks in advance.
I WANT ULTIMA 7 OR ULTMIA 6 CONSTRUCTION SET! I WILL DO ANYTHING! PAY ANYTHING! GIVE ANYTHING !

rld
Posts: 223
Joined: Sun Jan 25, 2009 2:17 am
Location: Dallas, TX

Re: I am having problem with this macro event...

Post by rld »

foody wrote:I have the following macro code #13:

1: IF A = 0 THEN 2
2: LMSG 4
3: STOP
4: IF A = 1 THEN 5
5: LMSG 5
6: STOP

at the dialog box for an NPC at the (INTRO) topic under response:

MACRO #13

I have set variable A to be 0 at the begging of the game where the player pass by it, it set variable A = 0. When I speak with the NPC all I get is a black screen no long message even though LMSG 4 AND 5 is filled with text. Any help here? Thanks in advance.
Your code is using the IF/THEN statement incorrectly here. For example, on line 1, the code checks if A is 0. If so, it will jump to line 2. If not, it will simply continue to the next line as usual. So, in either case, it is going to line 2, which is not what you want.

I'm not sure why you would see a blank screen, because it appears that you should always have LMSG 4 displayed, regardless of the value of A. I tried identical code and this is what I saw.

To display different messages based on the value of A, you want something like this:

Code: Select all

Macro 13:   
        1: IF A = 1 THEN 4
        2: IF A = 2 THEN 6
        3: STOP 
        4: LMSG 13
        5: STOP 
        6: LMSG 14
        7: STOP 
        8: 
This way, message 13 will be displayed if A=1, message 14 will be displayed if A=2, and no message will be displayed otherwise. You could add a default case after the last IF/THEN, before the STOP, by putting another LMSG command there.

User avatar
Garth's Equipment Shop
Posts: 638
Joined: Fri Dec 05, 2008 5:55 pm
Location: Festering Foothills
Contact:

Post by Garth's Equipment Shop »

figure out what was causing the black screen yet foody?

Are you seeing other long msgs you made elsewhere?

Try testing those msgs by having them show from within an item's action settings when looked at. like a sign or something.

My first thought was that maybe you had your text color set to black.. I could help out more if you could create a new design and try to recreate this exact problem in one of the default game sets and upload it.
Which of you is interested in my fine wares?

Post Reply