I fixed the last issue: Santa is now put into the room in the welcome
("Hello mortal") script. He then stays wherever you walked him previously,
even if Beasty leaves the room.
I made an new diff, which should be cleaner. I removed the VAR_EGO lines and
other stuff that I had just commented out before. I also renamed the "hero"
to "beasty", as Santa can now be a hero too.
You can now switch egos by "using" the other actor, and they can give things
to each other. I don't have a copy of DOTT or MM at hand, but I think there
they used special ego buttons or something, so that you could switch to
other egos, even if they weren't present in the current room. Maybe I try to
implement that next. Do you have a wishlist or anything?
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Index: road.scc
===================================================================
--- road.scc (revision 264)
+++ road.scc (working copy)
@@ -22,8 +22,6 @@
#include "common.sch"
bit welcomed,lost,santaHello,santaPlace,santaReal;
-actor santa;
-#define SANTA_COLOR 14
// our room
room Road {
@@ -36,9 +34,6 @@
boxd = "road.box";
trans = 0;
- //cycle testCycl = { 60, 0, 103, 111 };
- cost santaCost = "santa.cost";
-
voice letsgothere = { "letsgothere.voc", 500 };
voice welcome = { "welcome.voc" };
voice tv = { "file.voc" };
@@ -300,13 +295,19 @@
return;
case Use:
- if(objB == axe)
- egoSay("Killing him won't help us.");
- else
- egoSay("I can't just *use* someone.");
+ 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;
+ cameraFollowActor(VAR_EGO);
+
+ }
}
- }
+ }
+
local script walkOut(int eff) {
screenEffect(eff);
startRoom(Road);
@@ -376,22 +377,6 @@
// our palette is buggy, fix it
setRoomColor(0,0,0,0);
- // Setup the santa
- setCurrentActor(santa);
- initActor();
- setActorCostume(santaCost);
- setActorTalkPos(-60,-60);
- setActorName("Santa");
- setActorTalkColor(SANTA_COLOR);
- setActorAnimSpeed(2);
- actorObject[santa] = santaObj;
- // allow it to be outside of the walk boxes
- setActorIgnoreBoxes();
- putActorAt(santa,20,90,Road);
- // run the "standing" anim
- setActorStanding();
- setCurrentActor(VAR_EGO);
-
// init the print slot
egoPrintBegin();
actorPrintOverhead();
@@ -399,14 +384,21 @@
unless(welcomed) {
- putActorAt(VAR_EGO,440,0,Road);
+ // put santa in the room at start
+ setCurrentActor(santa);
+ putActorAt(santa,20,90,Road);
+ actorObject[santa] = santaObj;
+ setActorStanding();
+ // walk beasty into the room at start
+ setCurrentActor(beasty);
+ putActorAt(beasty,440,0,Road);
try {
setCameraAt(0);
panCameraTo(440);
waitForCamera();
- cameraFollowActor(VAR_EGO);
- walkActorTo(hero,430,80);
- waitForActor(hero);
+ cameraFollowActor(beasty);
+ walkActorTo(beasty,430,80);
+ waitForActor(beasty);
egoSay("Hello mortal.");
waitForMessage();
@@ -429,24 +421,24 @@
setCurrentActor(VAR_EGO);
setActorDirection(WEST);
cameraFollowActor(VAR_EGO);
- walkActorTo(hero,420,90);
+ walkActorTo(VAR_EGO,420,90);
break;
case 1:
putActorAt(VAR_EGO,460,0,Road);
cameraFollowActor(VAR_EGO);
- walkActorTo(hero,450,40);
+ walkActorTo(VAR_EGO,450,40);
break;
case 2:
putActorAt(VAR_EGO,60,144,Road);
setCurrentActor(VAR_EGO);
setActorDirection(NORTH);
cameraFollowActor(VAR_EGO);
- walkActorTo(hero,80,120);
+ walkActorTo(VAR_EGO,80,120);
break;
}
unless(lost) {
- waitForActor(hero);
+ waitForActor(VAR_EGO);
egoSay("I think I'm lost.");
lost = 1;
}
Index: common.scc
===================================================================
--- common.scc (revision 264)
+++ common.scc (working copy)
@@ -42,7 +42,10 @@
chset dialogCharset = "vera-small.char";
// and the costume for our actor
cost egoCost = "devil.cost";
+
+ cost santaCost = "santa.cost";
+
// an object for the cursor image
object cursor {
x = 0;
@@ -76,7 +79,7 @@
// set the actor costume, etc
script setupActors() {
// create the actor
- setCurrentActor(hero);
+ setCurrentActor(beasty);
initActor();
setActorCostume(egoCost);
setActorTalkPos(-60,-60);
@@ -86,7 +89,17 @@
setActorWidth(40);
setActorAnimSpeed(2);
// set VAR_EGO so we can use the *Ego* functions
- VAR_EGO = hero;
+ VAR_EGO = beasty;
+
+ // initialize santa
+ setCurrentActor(santa);
+ initActor();
+ setActorCostume(santaCost);
+ setActorTalkPos(-60,-60);
+ setActorName("Santa");
+ setActorTalkColor(SANTA_COLOR);
+ setActorAnimSpeed(2);
+
}
// setup all the verbs
@@ -417,16 +430,33 @@
egoSay("I can't pick that up.");
break;
- case Use:
- if(objA <= 0xF) {
- if(objB)
- egoSay("I can't use that on someone!");
- else
- egoSay("I can't just *use* someone!");
- } else
- egoSay("I can't use that !");
- break;
-
+ case Use:
+ if(objA <= 0xF) {
+ if(objB)
+ egoSay("I can't use that on someone!");
+ else {
+ // switch to another ego
+ if( objA == santa || objA == beasty ) {
+ VAR_EGO = objA;
+ cameraFollowActor(VAR_EGO);
+ }
+ else
+ egoSay("I can't just *use* someone.");
+ }
+ } 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;
+
case LookAt:
if(objA <= 0xF)
egoSay("There is nothing special about him.");
@@ -671,14 +701,14 @@
int i, count;
//unless(obj) return;
- count = getInventoryCount(hero);
+ count = getInventoryCount(VAR_EGO);
dbgPrint("%i{count} obj in inv");
for(i = 0 ; i < 8 ; i++) {
if(i < count) {
- obj = findInventory(hero,i+1);
+ obj = findInventory(VAR_EGO,i+1);
startObject2(obj,Icon, [ setInventoryIcon, invSlot0+i ]);
} else {
setCurrentVerb(invSlot0+i);
Index: common.sch
===================================================================
--- common.sch (revision 264)
+++ common.sch (working copy)
@@ -59,10 +59,13 @@
#define MAX_DIALOG_LINES 5
#define MAX_DIALOG_SENTENCE 16
-// define an actor for our hero
-actor hero;
+// define beasty
+actor beasty;
#define BEASTY_COLOR 7
#define BEASTY_DIM_COLOR 26
+// define santa
+actor santa;
+#define SANTA_COLOR 14
room ResRoom {
script showVerbs(int show);
_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general