
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuint varGALLOCAFE = 1;
function cGallo_Talk(Character *theCharacter, CursorMode mode) {
if (varGALLOCAFE == 1) {
dGallo1.Start();
varGALLO=2;
}
if(varGALLOCAFE == 2) {
dGallo2.Start();
varGALLO=3;
}
if (varGALLOCAFE == 3) {
dGallo3.Start();
}
}
function cGallo_UseInv(Character *theCharacter, CursorMode mode) {
if (cEgo.ActiveInventory == iCafetera) {
if (varGALLOCAFE==1) {
SetTimer(2, 300);
cGallo.Walk(800, 900, eBlock, eWalkableAreas);
cEgo.Walk(870, 900, eBlock, eWalkableAreas);
varGALLO=2;
}
if ((varGALLOCAFE==2) && IsTimerExpired(20)) {
SetTimer(2, 300);
cGallo.Walk(800, 900, eBlock, eWalkableAreas);
cEgo.Walk(870, 900, eBlock, eWalkableAreas);
varGALLO=3;
}
if ((varGALLOCAFE==3) && IsTimerExpired(20)) {
cEgo.Say("Creo que ya es suficiente");
}
}
Quote from: Khris on Sat 08/06/2024 09:55:42Leaving aside my player/cGallo mistake, the bool is defined right there in the first line of my snippet, and you were supposed to also put that in your own room script obviously.
Quote from: Snarky on Sat 08/06/2024 07:11:25AndreasBlack's code looks correct (apart from horrendously wrong indentation and formatting of the {} braces), but it will introduce a pause of some seconds between each walk. If you want the next movement to begin as soon as the last one is complete, you should replace all the IsTimerExpired() checks with !cGallo.Moving.
function room_RepExec()
{
if (player.Room == 6){
if (cGallo.x == 400){
cGallo.Walk(1000, 1020);
}
else if (cGallo.x == 1000) {
cGallo.Walk(400, 1020);
}
}
}
function room_AfterFadeIn() {
cGallo.Walk(1000, 1020, eBlock);
cGallo.Walk(400, 1020, eBlock);
cGallo.Walk(1000, 1020, eBlock);
cGallo.Walk(400, 1020, eBlock);
cGallo.Walk(1000, 1020, eBlock);
cGallo.Walk(400, 1020, eBlock);
}
function room_AfterFadeIn() {
cGallo.Walk(1000, 1020, eNoBlock);
cGallo.Walk(400, 1020, eNoBlock);
cGallo.Walk(1000, 1020, eNoBlock);
cGallo.Walk(400, 1020, eNoBlock);
cGallo.Walk(1000, 1020, eNoBlock);
cGallo.Walk(400, 1020, eNoBlock);
}
// room script file
function room_FirstLoad()
{
Overlay.CreateTextual(20,133,0, Game.SpeechFont, 15,"El 28 de julio de 1914,despues de siglos de tensiones, estalla una gran guerra en Europa.");
SetTimer(1,160);
if (IsTimerExpired(1)) {
player.ChangeRoom(2);
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.037 seconds with 14 queries.