Hi, I was just playing around with ScummC, and I have to say it's totally 
cool! Thanks for making it possible to mess around with the Scumm engine.

What I am trying to achieve with the sample "road" game is that you can 
switch egos, like in "Day of the Tentacle". It seems that it's almost as 
easy as switching the VAR_EGO variable to the right person. That's 
fantastic!

Santa isn't yet constraint by the boxes and the screen doesn't scroll for 
him, but since Beasty still reacts, I guess it's just a matter of changing 
some "hero" variables in the scripts to "VAR_EGO".

There are several issues with the inventory though, and here, except in the 
inventory handler script, I didn't find any Beasty-specific code that could 
be responsible for the errors. Here are the problems:

* When you switch from Santa to Beasty or vice versa, the axe is always 
displayed if one person has it in his inventory. It's only the picture 
though, the person holding the real axe can still use it as a command and 
the other can't. Maybe a script is needed to draw black boxes over empty 
inventory slots?

* This one is weirder: if one actor gives the axe to the other, it 
disappears in the first person's inventory. However, the image doesn't 
appear in the second person's inventory. There is an "axe" command in the 
slot, but it's only one pixel in width and several pixels in height. The axe 
can be used normally with this command, and be given back and forth, but the 
picture never appears again, only the invisible one-pixel wide command 
changes the owner.

If you have any ideas what additional commands and scripts are needed to 
organize separate inventories for several egos in ScummC, please tell me.

Thanks in advance!
Gerrit


These are the changes I made to the code so far:

in common.scc:

        case Use:
            if(objA <= 0xF) {
                if(objB)
                    egoSay("I can't use that on someone!");
                else {
                    // switch actors
                    if( objA == santa )
                      VAR_EGO = santa;
                    else if( objA == hero )
                      VAR_EGO = hero;
                }
            } else
                egoSay("I can't use that !");
            break;

...

        case Give:
            if(objB && objA <= 0xF) {
                egoSay("I'll give it to him.");
                setObjectOwner(objB,objA);
                break;
            }
            else
                egoSay("Can't give things to non-persons.");
            break;

...

    script inventoryHandler(int obj) {
        int i, count;
        //unless(obj) return;

        // change from hero to VAR_EGO
        count = getInventoryCount(VAR_EGO);

        dbgPrint("%i{count} obj in inv");


        for(i = 0 ; i < 8 ; i++) {
            if(i < count) {
               // change from hero to VAR_EGO
               obj = findInventory(VAR_EGO,i+1);
                startObject2(obj,Icon, [ setInventoryIcon, invSlot0+i ]);
            } else {
                setCurrentVerb(invSlot0+i);
                setVerbNameString(0);
                redrawVerb();
            }
        }

    }


in road.scc:

        case Use:
            if(objB == axe)
                egoSay("Killing him won't help us.");
            else {
                // switch actors
                egoSay("I will use Santa as my alter ego.");
                VAR_EGO = santa;
            }

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general

Reply via email to