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 - Caracal

#21
Well... it IS set to false. -_-
What do you mean with uploading the "source" somewhere?? How do i do that?
#22
Well its not really doing anything.
Nothing has changed. Only one question, do i remove the original "if (nm...)" function and replace it with the other or do i leave it untouched? Either way i do it, the cursor is still not reacting to the inventory items.
#23
Hello everyone after a long time I come up with another issue.
This time it has to do (so I think) with the extra fancy kings-quest cursor like in this topic:
http://www.adventuregamestudio.co.uk/forums/index.php?topic=46368.0;prev_next=prev#new
I have the following code:
Code: AGS

function repeatedly_execute() {
  int mm = mouse.Mode;   
  int lt = GetLocationType(mouse.x, mouse.y);
  int nm;
  if (lt == eLocationHotspot || lt == eLocationObject) nm = eModeInteract;
  else if (lt == eLocationCharacter) nm = eModeTalkto;
  else nm = eModeWalkto;
  if (nm != mm) mouse.Mode = nm;

This cursor-equation is really amazing and works perfectly fine.
But after continuing to develop my game I run into the following problem: I can not use Inventory Items.
Everything works perfect, the player clicks on an object and it is added to the inventory as the appropriate inventory item… But when I want to click on an inventory item, in order to use it. The cursor just wont change. It is as if I cant click inventory items at all.
My guess is now that it’s the cursors “fault”. But the cursor is besides that perfect I don’t want to have to change it.

Thanks in advance for any participation in finding a solution! ;-)
#24
As amazing as the new all in one cursor is... Could it be that the "use inventory function" is negotiated by it?
I have set up an inventory item and i set up the curos image and all but somehow if i click on the inventory item in the game...
Nothing happens. My thought was that the cursor immediately changes into the "interact" mode again.
I have the idea that it might be cuz of the cusor because inventory items are actually pretty basic and there is not much that could go wrong with them. (nonetheless i do have a problem here)
#25
Quote from: Khris on Wed 01/08/2012 01:41:32
There's a typo in there:

player_y = player_y;

is of course supposed to be:

player_y = player.y;

THATS IT!
Let me call you this: Genious! ;-P
Thank you so mutch, i just dont know how to thank you!
Sutch a tiny mistake i would have never noticed. But now everything works perfect. Now i am so close to create a totally new KingsQuest 7 like game!
Thank you Khris!
#27
The only function i have imported (custom made) is this:
Code: AGS
enum CauseOfDeath {
    eDeathTree, 
    eDeathSwamp
};

import function ShowgDeathGui(CauseOfDeath cod);

import function ShowDeathGUI(CauseOfDeath cod);     
String death_message[100];                        //Death message text
int death_picture[100];                           //Death message image

But this is actually only concerning the image and the text of a death scene which is obsolet for the current game as the player is just going to hear a diffrent voicefile...

But then i might have this here:
Code: AGS
function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button == eMouseLeft) {
    ProcessClick(mouse.x, mouse.y, mouse.Mode );
    player_loop = player.Loop;
    player_x = player.x; player_y = player_y;
    player_Room = player.Room;
  }
  else if (button == eMouseRight || button == eMouseWheelSouth){
    // right-click our mouse-wheel down, so cycle cursor
   mouse.SelectNextMode();                                                                     
  }
  else if (button == eMouseMiddle) { 
    // Middle-button-click, default make character walk to clicked area (a little shortcut)
    // Could have been just "player.Walk(mouse.x,mouse.y)", but it's best to
    // leave our options open - what if you have a special script triggered
    // on "walking" mode?
    ProcessClick(mouse.x, mouse.y, eModeWalkto); 
  }
  else if (button == eMouseWheelNorth) { 
    // Mouse-wheel up, cycle cursors 
    // If mode isn't WALK, set the previous mode (notice usage of numbers instead
    // of eNums, when it suits us)...
    if (mouse.Mode>0) mouse.Mode=mouse.Mode-1; 
    else 
    { 
      // ...but if it is WALK mode...
      if (player.ActiveInventory!=null) 
      {
        //...and the player has a selected inventory item, set mouse mode to UseInv. 
        mouse.Mode=eModeUseinv; 
      }
      else 
      {
        // If they don't, however, just set it to mode TALK (change this line if you add more cursor modes)
        mouse.Mode=eModeTalkto; 
      }
    }
  }

The first lines are what i thought important. I thought this would be enough to save the position of the player. But oubviously its not sufficient enought.
#28
Quote from: Khris on Sun 29/07/2012 17:16:58
So you're setting all these variables at the start of the function that leads to the player's death, right?
Because if you forget to set player_y, it remains 0 and thus the character will be placed at (X, 0), outside the visible area.

That sounds like this might be what happens. I dont set the these variables properly. But how do i do it? Last time i just created the global variables and it worked macikally.
#29
Thats the function for the "Try again Button":
Code: AGS

function btnDeathButton_OnClick(GUIControl *control, MouseButton button)
{
    gInventory.Visible=true;
    gDeathMessage.Visible = false;
    player.Loop = player_loop;
    player.ChangeRoom(player_Room, player_x, player_y);
}

I have created global variables with the name "plaer_loop" "player_Room" "player_x" "player_y". Actually... everything as it should be. I thought.
#30
Quote from: Khris on Sat 28/07/2012 00:50:27
Regarding the respawning, if the room is shown, the character is there, too. They might be outside the screen, transparent, behind a walkable area or use an empty sprite, but they must be there because the current room is always the one the player character currently is in.
If debug mode is enabled, test the game and hit Ctrl-D to get an overview of all the characters within the current room.

Well its true, the player is there (logically as you say) but... somewhere totally off space. On a position in the room which is out of any sight (280, 0 or something) which is odd. Even if i interact with other characters in the screen, the dialog will be properly triggered just that i cant walk around and that my playercharacter is not there.
#31
Well now it works just fine!!!
And... jes... i had the cutscenecode twice. Once for each possibility. But i removed it and the problem was solved.
Thank you very much! 
But still i am having difficultys with the "respawn" after exiting the "death-message room" the character does not return into the previous room, even though the room is shown.
#32
I usually draw high resolution backgrounds and charactersprites. But as I used a game with 1024x… resolution the compiled game looks really … “nasty”. So I decidet to create a game with less resolution but still it looks pixel-ish in the compiled version. Is there a way not to see it in full screen, like the testrun in AGS. In the small test-run window in the AGS editor everything looks perfect (since its so small)
#33
I sometimes use the „walk to hotspot“ function in the room editor. But sometimes I simply forget about that and put the coordinates into the roomscript that’s why there is a difference.
Anyhow.
The ting is that I want the Timer to stop right after the player hides behind the flowerpot. Since it is not possible to determine the exact time of when the player does that I simply trigger a cutscene right after Bella is hitten == ture. But the disadvantage is that after the death screen is left… the scene which follows after the timer, will also occur. The player dies twice for one and the same thing.
(actually in my room script it is a bit more difficult I have 3 bools concerning this, since there is a 3rd character that is involved. So in the end the timer has to stop when isBell == true, BellaHidden == true, Witnessisblind == true, or something like this)
#34
I have the following problem:
I would like the player to press the bell of a house. After about 5 seconds a which opens the door and enchants the player. Only if the player hides behind a flowerpot the which will not find him. For this I have set up the following:
Code: AGS

function hDoorbell_Interact()
{
cBellatrix.LockViewFrame(3, 2, 1);
Wait(80);
cBellatrix.UnlockView();
SetTimer(1, 220);
isBell = true;
  if  ( false && BellaHidden == false && IsTimerExpired(1)) {
Death Scene occurs
}
}

This is basically what happens when the doorbell is rung. I used the bool “Bella Hidden” to check if the player is behind the flower pot or not.
If the player does not go behind the pot, and just waits until the timer expires I have set up this:
Code: AGS

function room_RepExec()
{
if (IsTimerExpired(1)){ 
Death Scene occurs
}
}

But if the player does click on the big flower pot just in time then the player hides and the following appears:
Code: AGS

function hTopf_Interact()
{
if (isBell == false){
cBellatrix.Walk(195, 484, eBlock, eWalkableAreas);
cBellatrix.Say("There is a big Flowerpot.");
}
else if (isBell == true){
cBellatrix.Walk(98, 508, eBlock, eWalkableAreas);
cBellatrix.LockViewFrame(3, 2, 0);
Wait(90);
Death Scene occurs
isBell = false;
  }
}

Now thats all pretty simple i think. The reason why I am telling this is that once the player hides behind the flowerpot basically
function Topf_Interact
else if (is Bell == true)
and after the death scene occurred. The scene which happens within function rep.ececute (  if  ( false && BellaHidden == false && IsTimerExpired(1))) also occurs right afterwards.
So the “rep execute” function happens in any way.

I was thinking that this problem might be solved if I turn the first timer off while it is running, in case the player hides behind the flowerpot. But how do I turn a timer off?
#35
And whats with the issue that if you create a game with a resolution of lets say … 640x480. In the AGS-preview everything looks perfect, just the way I worked it out in Photoshop. But… once I compile it and run it as a final version then suddenly the game is stretched over the full computer screen and everything looks totally ugly… Really nasty.
The same happens with every resolution I choose even the maximum 2024x768 looks wonky.
#36
All right let me try then:
Well first of all crimson wizard answered most questions:
The portrait is suppose to show up only in the death room. Its not suppose to be some sort of Sierra style portrait. That’s why I thought seting up a new Chara for this would make it easy!
As far as for the scripting concerning the death Room, I have this:
Code: AGS
  In the Global Script ash. I have this:
enum CauseOfDeath {
    eDeathTree, 
    eDeathSwamp
};

Code: AGS
  
import function ShowgDeathGui(CauseOfDeath cod);

import function ShowDeathGUI(CauseOfDeath cod);     //i have been told to do this
String death_message[100];                        //Death message text
int death_picture[100];                           //Death message image


But these things would be relevant if I had a certain death-picture and text appearing for certain ways of death. Her I don’t want all this, I only want the character to say something different each time a death occurs. I added it into the script because I was hoping to change it later on in a way it might help me.
Furthermore I have this in the top of my global script:

Code: AGS
  function ShowgDeath (CauseOfDeath cod){
  lblDeathMessage.Text= death_message[cod];
  gDeathMessage.Visible = true;
   }

The next thing, of which I hoped it would do the most important part I have under the function (on mouse click):
Code: AGS
  
else if (button == eMouseLeft) {
ProcessClick(mouse.x, mouse.y, mouse.Mode );
}
else if (button == eMouseLeft) {
player_loop = player.Loop;
player_x = player.x; player_y = player_y;
player_room = player.Room;
ProcessClick(mouse.x, mouse.y, mouse.Mode );
}
 


Therefore I set up the global variables (Player_Room, Player_loop. Player_x, Player_y). This is suppose to save the charas position before the fatal action occurs. But I am afraid that this might also be a reason of the problem because once I press the “restart” button… the player changes rooms but the character wont appear.
Then I have this triggered when the player presses the restart-Gui Button:
Code: AGS
  
gDeathMessage.Visible = false;
player.Loop = player_loop;
player.ChangeRoom(player_room, player_x, player_y);


I know its basically an attempt to apply Krhis´ code from the other topic in my game but obviously I made something wrong. I just cant see what.
Also there is a scene in which the player gets caught by a tree once a timer is expired after a he walked on a certain region. For this I set up the following in the given Roomscirpt:
Code: AGS
  
function region2_WalksOnto()
{
if (Zbirdfree == 0){
oBaum.SetView(4, 0);
player.Walk(291, 317, eBlock, eWalkableAreas);
player.FaceLocation(341, 129, eBlock);
oBaum.Animate(0, 10, eOnce, eBlock, eForwards);
cBellatrix.LockViewFrame(3, 0, 0);
oBaum.SetView(4, 1);
oBaum.Animate(1, 10, eOnce, eBlock, eForwards);
Wait(60);
player.UnlockView();
oBaum.SetView(4, 0, 1);
player.ChangeRoom(304);
}
SetTimer(1, 420);
}

function room_RepExec()
{
if (IsTimerExpired(1)){
oBaum.SetView(4, 0);
player.Walk(291, 317, eBlock, eWalkableAreas);
player.FaceLocation(341, 129, eBlock);
oBaum.Animate(0, 10, eOnce, eBlock, eForwards);
cBellatrix.LockViewFrame(3, 0, 0);
oBaum.SetView(4, 1);
oBaum.Animate(1, 10, eOnce, eBlock, eForwards);
Wait(60);
SetTimer(1, 420);
player.UnlockView();
oBaum.SetView(4, 0, 1);
player.ChangeRoom(304);
}
}


Everything works fine but once I press the “try again button” the player changes rooms and everything is as it was (Player is still caught by the tree and nothing has changed, as if the “on mouse klick” modifications with global variables did not occure.
#37
Well actually this is the main "problem".
Back at the time we spoke about this i was working on another game. But the difference is that there i had a diffrent image and text appearing after the scene. Now, here i want another monolog to be triggered. I dont quite know how to deal with that change.
Also if i apply the scripting, then there is a problem with the "player_Loop". If i press the "restart" button then the room changes into the previous room (as wanted) but the playercharacter just wont show up. I have looked at it over and over again... But i cant find the mistake (as this has actually nothing to do with the speech of the protrait).
I could send all the scripting i have but i thinkg it would be another topic?
#38
Quote from: Khris on Sat 14/07/2012 00:17:51
This is probably a dumb question, but just to make sure: is player.PreviousRoom actually 2?
Yes, previous Room is #2.
But honestly the "previous room" is not a good solution. Just emagine if there are rooms (and there are) in which several death scenes occure... how wouldi i program the diffrent lines the portrait sais? I need a better solution for this.
Also to answer Crimson Wizards question:
The protrait does not talk at all, neither does it moove its libs nor does the speech appear.
#39
Jes i considered the problem with the diffrent directions thats why i set up these loops as well.
If i use Character.Animate, will i be able to just play the speech file (sound file) in the background just as easily as with the Say function???
#40
Quote from: Crimson Wizard on Fri 13/07/2012 22:50:17
What is your global game speech setting? I mean Global Settings -> Dialog -> Speech style? I may be mistaken but I have a guess yours is set to Sierra-style?
Please elaborate, what is your aim, how do you want your speech look like? Unless you tell this it will be more difficult to help you.
Hmmm... that was a good hint! I changed the general settings into Lucasarts (i never noticed i changed them to Sierra Transparent).
This lifted the first problem, i guess AGS wanted to create some sort of portrait for me.
But still, the problem with the character portrait remains.
I want something that is exactly like this:
http://www.youtube.com/watch?v=l_xLZnA3wiw&feature=g-vrec
After the death scene in the game the player changes into Room 304, and there a portrait says something like "the weather is nice" or "lol" whatever.
The problem is just that 1. : the portrait in my game does not talk at all (i tread it as a regular character with a speech view´-see screenshot)
and 2.: i dont know how to set up the diffrent quotes the portrait says after certain death-scenes.
SMF spam blocked by CleanTalk