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

#41
Hello everyone!
This time I have an unexpected problem with something rather basic- this is why I am so helpless.
It’s the speech view adjustment. It seems to not work at all this time, even though I am doing everything as I usually do.
To get an idea of the problem here are screenshots:
https://dl.dropbox.com/u/87581860/Speech%20view%20problems.png

Basically once I set up the speech view and assigned it to the character (as usual) once the speech is triggered in the game, the character appears twice on the screen. The speech-double just pops up, out of any willable area and the speech view occurs without any delay or something.
Its just odd I never had this problem before.
Also there is an extra character. A portrait of the character. Each time the player expires, he enters a special room in which a portrait of the character appears and according to the death scene it is suppose to say something different (that’s something I haven’t quite figured out how to do, jet). The problem is, that the portrait is not talking at all. Even though I have set up a speech view, also as usually.
I used this code in the room:

Code: AGS

// room script file

function room_Load()
{
Wait(30);
gInventory.Visible = false;
gDeathMessage.Visible = true;
aExpired.Play();
if (player.PreviousRoom == 2){
  cPortrait.Say("So ein garstiges Gewächs!");
}
}


But it seems as if my “Say” command is totally ignored. Maybe it has something to do with the general Speech problem I seem to have.
Does anyone have any ideas?
#42
Quote from: ThreeOhFour on Wed 11/07/2012 12:23:00
You have the ProcessClick function twice in there. That means it will process your click twice.

Delete one of these.

Jes! This is IT! Thank you so mutch it seems to work the way i wanted it now! How did you see that so fast, i bed i looked at the exact line at least twice and did not notice. Thank you a lot! Now i have the ultimate Kings quest cursor and nobody can stop me!!! I did not even need to learn how to apply modules and such!
Thank you very mutch.
But i am afraid that there are already other issues comming up with the death-scenes again, for which i will start a new threat, soon.
#43
Oh ok. My global script shows this:
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;

  // Put here anything you want to happen every game cycle, even when
  // the game is paused. This will not run when the game is blocked
  // inside a command like a blocking Walk()
  
  if (IsGamePaused() == 1) return;

  // Put here anything you want to happen every game cycle, but not
  // when the game is paused.
}

function repeatedly_execute_always() {
  
  // Put anything you want to happen every game cycle, even
  // when the game is blocked inside a command like a
  // blocking Walk().
  // You cannot run blocking commands from this function.
  
}


On Mouse click:

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;
    ProcessClick(mouse.x, mouse.y, mouse.Mode );
  }
  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; 
      }
    }
  }
}


And thats the Room-interact script (basically all i have done in the room script concerning this issue jet) but i suppose thats insufficien:


Code: AGS
function hHotspot1_Interact()
{
cBellatrix.Say("WAAAH!");
cBellatrix.Say("Wo bin ich hier nur gelandet?");
}

So basically i changed nothing only that i inserted the mentioned code from the other tread into my "repeadetly execute" scrip function. And thats all.
#44
Quote from: ThreeOhFour on Mon 09/07/2012 11:46:51
That code doesn't reference the eModeLookat anywhere, all it is doing is switching it to the Interact mode over a hotspot or an object, the Talkto mode over a character and the Walkto mode when it's not over any of these.

Therefore, instead of trying to trigger looking or any clicking, you should be using the talking function on characters and the interact with function on object and hotspots.
Ok. that was a helpful hint! Thank you, now that i use interact (rather than look at) on a hotspot it works. BUT the event is still triggered twice. How does that work???
#45
Quote from: Khris on Mon 09/07/2012 14:41:51
Yes, and for this to work properly, in on_mouse_click / eMouseRight, instead of switching to the next cursor mode, you should call ProcessClick(mouse.x, mouse.y, eModeLookat); (or is it eModeLook? I can never remember.)
Now, just to make sure: DON'T USE THE "ANY CLICK ON..." EVENT.

And until you post the code in your room script, we can only guess where the error is.

Now wait. i am suppose to put this into the room script?
I thought i had to go to the globalscript.asc under the "repeadeately executed" function???!!
#46
Quote from: Khris on Sun 08/07/2012 18:29:36
You don't need to use "any click on" though; just use the regular event interact/talk to event.
Well the problem is, if i put this code into my script:
function repeatedly_execute() {
 
  int mm = mouse.Mode;                                                      // Ultimate Cursor code from Krhis!!!
  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;

-the code you created. and i trigger "any click on object (or hotspot)" then the event occures twice. If i trigger "look at object/hotspot" then nothing happens at all. So only any click on object works and this even twice. Looking at the mouse code i cant see how or why this happens, since everything (as far as i am able to understand) just focuses on the cursor.
#47
One itsy bits problems remains:
When i click on a (for example) hotspot then the triggered event occures twice for some reason.
I used "any click on object", rather then "when player looks at object" since this is obsolet.
#48
Quote from: Kastchey on Sat 07/07/2012 18:15:49
I encountered this issue a few times while importing graphics in PNG format. For some reason, AGS sometimes incorrectly reads color values in PNG and only PNG (as far as I noticed, at least) even if the image has no alpha channel. Try converting your PNG frames to GIF, it always does the trick for me if this problem occurs.
Well i did this and now it works. But just saving them as Gif wont solve the problem. I still wonder why ags will accept the same PNG files in other projects but not in this particular one...
Its strange. But thanks for the hint though now everything works and i can go on! :-)
#49
Quote from: Khris on Sat 07/07/2012 17:15:43
There seems to be something wrong with the png files themselves; it doesn't look like an AGS-related error.
Could you upload one of the sprites for us to take a look at?
https://dl.dropbox.com/u/87581860/walk%20front%203.png
This is the plain PNG file.
I usually keep the backgrounds empty, this is the major advantage to JPG (besides some others). The strange thing is that i importet this exact PNG into another game project i have been working on, and it worked perfect there. Maybe i screwed something in the global skript (trying to work on a way to get the "ultimate cursor" untill you gave me your code) and thereby i damaged something. I dont know but its really strage because in other game projects... AGS doesent do this with this particular PNG.
But the background of this file is empty. Not even white just plain empty and this usually worked, so far...
#50
Ah at the first look it seems to work, i will double check this later. Greater problems have developed (as you can see in the "black pixel" threat) ;-P
But i thiank you!!!
#51
Hey everyone.
I got a real problem now and this does not result primarily out of my lacking scripting-knowledge.
https://dl.dropbox.com/u/87581860/Black%20pixel.png
I was working on a new game and I noticed that there is a nasty black-pixel area around the sprites…
The sprite files are PNG and the black area is actually empty. I have worked on several projects now
and everything worked just fine. This is the first time that something like this occurs.
I am desperate, what might the problem be? Did anyone ever have the same issue?
Is there a way to remove this problem?
#52
Quote from: Frito Master on Fri 06/07/2012 19:26:59
If you search there is a module that works fine, I think its called single cursor.
Modules are not working for me... I just dont know how to use them if i havent set the skripting up myself i wont learn how to do it by myself next time! ;_;
#53
Oh i just noticed that my idea is not the smartest since the game will not properly work.
If i just rename the "walkto" button the game will be screwed unless i change every single "walkto" in the global script. The entire defaultgame is based on the idea of cursorchanges.
#54
Quote from: Khris on Fri 06/07/2012 15:30:00
I sure do :-D
Things as these are NEVER done on a per-room basis. Code for each and every object and hotspot? Good night.

Lookie here for a very similar solution: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=46367.0

@ Krhis :
"GlobalScript.asc(70): Error (line 70): '.GetLocationType' is not a public member of 'Game'. Are you sure you spelt it correctly (remember, capital letters are important)?"
is what AGS tells me as soon as i give in the suggested function in the threat you pointet out.
I have decited to do the following: i crossed out this function:
else if (button == eMouseRight || button == eMouseWheelSouth){
    // right-click our mouse-wheel down, so cycle cursor
   // mouse.SelectNextMode();                                                 // this is what i crossed out for the cursorwheel
  }
I left the other modes as they are (the player can not reach them since he can not leave the walk mode. Can i now basically change the symbol of the Walk icon... and put over every hotspot "any click on object/hotspot/character" the event i want.
This way I should archieve the same result, right??

And @ mouth of war:
Thanks for the idea. But for the death panel i always want the same things to be displayed, the Protrait is always going to look alike. Only the things, that the portrait says are diffrent, depending on the occured death scene.
#55
Hello everyone. I am still working on a game that comes really close to Kings Quest 7.
But in order to keep ít authentic I need to create a cursor just like in the game!
This cursor combines the “walk, interact, talk, use inventory and look at” cursors all in one (the only exception is the “wait” cursor which appears in form of a crown).

Since AGS Default game comes with all of these cursors separately I wonder how I shall create the all uniting mother-cursor. Because in order to do that I have to switch off the “switch cursor mode function” (with right click). I am afraid to mess around blindly, fearing I might irreparably screw my default game (I already set up the death-functions).

Further I wonder if anyone has an idea which screen-size I should best use to reach the KQ7 flair? Which resolution is used in the original game, does anyone know or have a suggestion?
So far i use the maximum of 1024/768 because i usually draw highly detailed backgrounds.

Also I have a question besiedes that:
In the game I have set up a â€"for sierra typical- die function which is based on my former question, answered by Khris:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=45643.msg612963#msg612963
Now this time I don’t want to display different text- and images within the death guy. I would like to have a portrait of the “expired” character and it shall say different things every time.
I thought I could just create a new character called “Rosellaportrait” and then set a speech view. Each time the Gui appears the portrait says something. But how do I best set this up? Do I just replace a “DeathPicture” with a “Deathdialog”?


Thanks to everyone in advance!!!
#56
Quote from: Khris on Mon 02/07/2012 11:01:53
As for your module question, you right-click the Scripts node and select "Import...", then the module. That's all.

Only one more qestion: Which kind file does the module has to be? I downloaded it and saved it on my desktop as "txt"-file but when i open the "Import" window in AGS (after rightklick on the script in the actiontree) it wont show anything but the empty folders.
#57
One qestion to Khris:
// set foreground object4.
Object*o = oTrees;
Does this replace the oTree in the scripting lines you mentioned here?
I would be interested in this parallax moving but i dont know how to use (apply on my game) the module that trothmaster found. (i just simply dont dare to open a tread about "how to use modules" running the danger that this might have been asked before)Therefore i need to understand this!
#58
Makes perfectly sense! Naturally the character faces the direction of interaction, i observed that on other interactions before i just did not remember at the moment. How do you know all these things, did you program AGS yourself?! (rethorical question i suppose)
#59
I changed the Lock view 4 into an Unlock View.
And it was the blue cup. (it just looked like the poster at the first sight.
I was not sure but then I thought . Then I saw that in the “normal” character view for cMurder I had only one image (the first frame of loop 0) Since the cMurder is a static figure he needed only this one frame (think of it as a stature) therefore I thought that I could leave the loop 1 and 2 empty. But I noticed that AGS used the blue cup as the default images and automatically generated these. I just replaced them with the image from loop 0. And now everything works fine. Even though the cMurder does not move from the spot.
I think that’s it.
Thank you so much Khris.
I believe it was not easy with me but now I have everything so far. I am glad now and cant tell you how happy I am. Thanks to you I can finally do something Sierra-KingsQuest 7 like. You’re a hero!

how can I mark this thread as solved?
#60
Allright, this does it! Problem solved the GUI works.
By stressing that I have to import it into the asH script you told me just the right thing! … It works. Thank you so mutch !
But there still is something, that, I think, you mentioned earlier.
After the following scene occurred:
Code: ags

function region2_WalksOnto()
{
  cMurder.LockViewFrame(5, 1, 0);
  cHenk.Walk(593, 611, eBlock, eWalkableAreas);
cMurder.LockView(PLANTACTION);
cHenk.LockViewFrame(ROONFALL, 1, 0);
cMurder.Animate(0, 15, eOnce, eBlock, eForwards);
cMurder.UnlockView();
cMurder.LockViewFrame(5, 1, 0);
Wait(10);
aAmbiente.Stop();
cMurder.LockView(4);
cHenk.UnlockView();
ShowgDeath (eDeathPlant);
cHenk.ChangeRoom(302);
}

Everything is fine now with the GUI and the restart. BUT, once the Player enters the previous room again the View of the “cMurder” is kind of… well it’s the default-purple-poster. When I step onto the region again, the animation occurs as normal but the normal view of cMurder has permanently changed into the default graphic. Strange, what could be the reason?

SMF spam blocked by CleanTalk