Menu

Show posts

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 Menu

Messages - humaldo

#1
So, I tried it out and it works perfectly now! Funny, how such a simple thing can cost me so much time :-)

@Calin Leafshade: Hm, the following function doesn't seem to work correctly without CallRoomScript (or calling another function), because the dialog is started AFTER the function finished.

This function would show "Dialog Start", followed  by "Dialog End" BEFORE the dialog script even starts.
Code: ags

function startScene(){
  if(g2_Progression == 0){
    Wait(20);
    cPlayer.Say("Dialog Start"); 
    dAct2_Dialog.Start(); // <- Dialog doesn't start here but...
    // CallRoomScript(1); 
    Wait(5);
    cPlayer.Say("Dialog End");
    FadeOut(1);
    cPlayer.ChangeRoom(5, 327, 121);
    Wait(50);
  }
//<-- ...dAct2_Dialog.Start(); starts here.
#2
Good Morning!
Thank you for your answers. I lied in bed when the soltution came to my mind: It's the "Enters the room before fade-in". So far I only used "...before fade-in" OR "after fade-in". I didn't use both at the same time because I thougt there are either-or events. But apparently they are not and it makes sense to place the things that have to happen instantly and unseen (e.g. disabling objects, starting sounds etc) with the "before" event and everything else with the "after" event.

@on_call: The code above is the outcome of countless of tries to get the problem solved. Now that i know where the problem lies, I will get rid of them again and make the code more readable again.

Thank you very much!
#3
Hello again!

Aparently I didn't understand anything, I have another strange problem now:
After finishing a Puzzle I want to send my player character to another room and
let him walk to the middle of this room. But the screen stays black until all actions
are finished and the fade-in happens afterwards!

I tried a lot of variations, but without any success... I have no idea what I could try
else to make the fade-in happen directly at the beginning of the room change...

Here's the code:

FIRST ROOM:
Code: ags

// 1/6 - CallRoomScript (2); when the puzzle is finished
function on_call (int value){
if (value == 1){ 
    cPlayer.Say("Finished!");
    Wait(20);
    g2_Progression = 1;
    cPlayer.ChangeRoom(4, -10,  172);
    Wait(40);
  }
  else if (value == 2){
      FadeOut(1);
      // <--2/6 - Fade out happens here
      g2_Progression = 3;
      cPlayer.ChangeView(1);
      cPlayer.ChangeRoom(4, -10,  172); 
      cCharacter.ChangeRoom(4, 280, 160); // 3/6 - Characters are moved to other location
      Wait(30);
  }
}


NEW ROOM:
The "Enters the Room before Fade-In" Event:
Code: ags

function room_Load(){
  stopRemainingSounds();
  if(g2_Progression == 1){
    CallRoomScript(1);
  }
  else if(g2_Progression == 3){ // 4/6 - startScene(); Function is started
    startScene();
  }
}

Code: ags

function startScene(){
  if(g2_Progression == 0){ 
    Wait(20);
    cPlayer.Say("Start");
    CallRoomScript(0); 
  }
  else if(g2_Progression == 1){
    cPlayer.Say("Puzzle 2.2");
  }
  else if(g2_Progression == 2){
    cPlayer.Say("Cheat Shortcut to Practice 2");
    CallRoomScript(0);
  }
  else if(g2_Progression == 3){ // 5/6 - this else if loop is called
    cPlayer.Walk(20, 175, eBlock, eAnywhere); 
    cPlayer.Walk(185, 165, eBlock, eWalkableAreas);
    cPlayer.FaceCharacter(cCharacter, eBlock);
    // <-- 6/6 - The Fade-in happens only here!
    dAct2_Review2.Start();
  }
}


Thank you so much in advance!!
#4
I know this is a rather old thread, but the topic is still valid so I decided to post my finding here:

I recently tried running AGS on my 2013 Macbook and downloaded the 15 days demo version of parallels desktop. I installed Windows 10 tech preview and installed AGS there. It seemed to work well, AGS ran without any problems. But when I tried to start a compiled game by clicking the .exe , an Error window showed up: "ERROR - Unable to find or open ':/(Filepath)'."

After I tried to tweak a few things without any success, I installed Windows 8 on Parallels Desktop, but the result was the same. So I decided to use Bootcamp to install a "real" version of Windows on my Macbook. Having to reboot for being able to work on AGS games isn't that bad :)
#5
Wow, thank you for the great answer and explanation!! I admit I have to study it a bit longer to fully understand it, but it starts to make more sense to me now :)
#6
Hallelujah, it worked, thanks so much!! But I just doublecked, I did it exactly the same way as before in other parts of my game, and there it still works... 

The more i work with AGS I less understand some things. There seem to be plenty of strange behaviors if something is not 100% done the way as intended. The most time I've spent so far in AGS was to find ways around those things... Or is it just me?
#7
Thanks, Snarky :cheesy:! That sounds reasonable, I'll try it asap!
But the strange thing is that calling the CallRoomScript() in dialogues AND ChangeRoom afterwards works in other situations of my game...
I'll keep you informed!
#8
Hmm, searched a bit around and there seems to be a couple of room template issues around, like this here:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=35961.msg471663#msg471663
#9
Hi Mandle!
I already deleted room4 (which i created out of the template of room2), created a new, empty room and tried to get my characters there via ChangeRoom - without success. Could it be that i kina "destroyed" something in my Room2 when i made a template out of it?

And if this is the case - who could I solve it?
#10
Thanks for your answer. But I just checked it again, there's nothing in Room4 yet which could send my player character back. And as i said, changing to any other room doesn't work either.

But I tried something else: In the on_call(10) i set the Act Global var to "Act = 2".
Then I added an else_if (Act == 2) when the player character leaves the room (room_LeaveLeft() )
...and there it works!! Exact the same cPlayerCharacter.ChangeRoom(4) function than in the
on_call function.

To sum it up:
1) The on_call(10) after returning from a dialog works and all functions are executed...
2) ...except of the ChangeRoom of the Player Character
3) The ChangeRoom works with NO other room of my game
3) Exactly the same ChangeRoom function works when the character leaves the room with room_LeaveLeft()
#11
Hey Jay, thank you for your answer!!

But unfortunately it doesn't have any effect. It's exactly the same as before.
I changed the brackets exactly as you described (else { if { instead of else if {)
and i changed cPlayer to Player.

I have no room_RepExec() function in my room, and neither do I in any other room.
As I said, the ChangeRoom works in dozens of other cases in my game...

Maybe the steps I did before could help:

  • I finished my Room2 Script, everything worked.
  • I already had the on_call function working, but with "quitgame(0)" which worked
  • Then I wanted to duplicate Room2 for my next Act
  • So I created a template out of Room2
  • I created the new Room4, using the template of Room2
  • I renamed and modified Room4 properly
  • Room2 Script: I deleted "quitgame(0)" and put both ChangeRooms into the script
  • Then I tested the transition to Room 4
  • -> Player Character stays in Room2, the other character disappears, the fades are very short.

Could it be an AGS bug?

Thank you very much!!
#12
Hi there!

After hours of googling and searching the AGS board I finally decided to post my question here:

I used the cCharacter.ChangeRoom() function a dozen times, but it somehow doesn't work in one specific room anymore.
Here's the code:

Code: ags

function on_call (int value) {
  if (value == 0) {
    disableBooks();
  }
  else if (value == 10){ //Returning from a Dialog
    Display ("End Of Act 1");
    Wait(40);
    Display("Now it should change to Act 2...");
    cCharacter.ChangeRoom(4); //This character disappears
    Wait(40);
    cPlayerCharacter.ChangeRoom(4); //but the player character stays in the same room
  }
}


I'm returning from a dialog (with CallRoomScript(10); ) and just want that both characters change to room 4.
But only cCharacter changes (he disappears) and after the Wait(40); a quick fade-out and fade-in occurs, but my
cPlayerCharacter is still in the same room. No error message, nothing.

I've tried various things, like changing to another room, but it seems my Player Character can't leave this room anymore.
Accessing Room 4 from other places is no problem, so there's no problem with Room4.

Is there anything I don't know? I found this here "This means that you should not use any other commands which rely on the new room (object positionings, and so on) after this command within the same function." but i don't know of any other commands which are currently running...

I would be endlessly helpful if anyone could give me a hint, this problem already cost me 4 hours...

Thank you!!
Cheers,
Christian
SMF spam blocked by CleanTalk