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

Topics - Meistari F

#1
Hi all.

I have again problem with a very difficult code.



As you can see from this image from Leisure Suit Larry 2.  The Luggage slides from left to right.
When it on the region where the x-ray window it shows a x-ray  image sprite.  When it slides out it shows the luggage and it continues to slide right.
And then it begins from the start, sliding another x-ray sprite image on the slider and another luggage image appears too when it comes out of from the x-ray window.
I hope you understood me.

I have two region for this.  Region 2 and Region 4. 

When the object is on region 2 I want to change the image of the graphic.
And again when it slides on region 4.


In First Loading screen my code is:

Code: ags
SetTimer(1,275);


Here is my code.

i
Code: ags
 function room_RepExec()
{

oThings.X= -50; oThings.Y=158;

if (!oThings.Moving){
oThings.Move(310, 157, -3, eNoBlock, eAnywhere);
}

/////This code lets the object slide from right to left endless.



Region* Taska1 = Region.GetAtScreenXY(oThings.X, oThings.Y);
if (Taska1 == region[4]) {  
    oThings.Graphic=5903;
    SetTimer(1, 175);
   }
if (Taska1 != region[4]) { 
if (IsTimerExpired(1)){
    oThings.Graphic=1425;
    SetTimer(2, 800);
}
}
}
  


This code works!  The graphic changed in each times the object slides on Region 4 and when it is off the Region 4.

And it continues to move from left to right. And it returns back on the same spot where the object start to move from left to right.

But the problem is I want to change the graphic again 12 times when it goes on same region 4

I hope you can help me with this because this is so difficult for me.


I also tried this code.



Code: ags


 function room_RepExec()
{

oThings.X= -50; oThings.Y=158;

if (!oThings.Moving){
oThings.Move(310, 157, -3, eNoBlock, eAnywhere);
}


if (IsTimerExpired(2)){
  SetTimer(1, 0);
   oThings.Graphic= 1429;
    SetTimer(3,  275);
}
else if (IsTimerExpired(3)){
      SetTimer(2, 0);
        oThings.Graphic= 5894;
    SetTimer(4,  800);  



That code worked great until I found out about this in Help section:   There are 20 available timers, with TIMER_IDs from 1 to
So I could add more Settimer.  I hope that will be changed in the next update.

edit......
Thanks to Crimson Wizard he solved this for me.  Case Closed.


Code: ags
// Set these according to your game
#define POSITION_START_MOVE         0
#define POSITION_CHANGE_GRAPHIC 100
#define POSITION_END_MOVE            310
 
function room_RepExec()
{
    // If thing is not moving OR if it just went all the way to the right -
    if (!oThing.Moving || oThing.X >= POSITION_END_MOVE) {
        // Move thing back
        oThing.X = POSITION_START_MOVE;
        // Switch to next object's x-ray graphic (set to your sprites accordingly)
        switch (oThing.Graphic) {
            case 1001: oThing.Graphic = 1100; break;
            case 1101: oThing.Graphic = 1200; break;
            case 1201: oThing.Graphic = 1300; break;
            //... etc
        }
        // Begin moving through x-ray window
        oThings.Move(POSITION_END_MOVE, 157, -3, eNoBlock, eAnywhere);
    }
    // If thing was moving and just passed x-ray window
    else if (oThing.Moving && oThing.X > POSITION_END_MOVE) {
        // Change from x-ray to normal graphic (set to your sprites accordingly)
        switch (oThing.Graphic) {
            case 1000: oThing.Graphic = 1001; break;
            case 1100: oThing.Graphic = 1101; break;
            case 1200: oThing.Graphic = 1201; break;
            //... etc
        }
    }
}





#2
Hi. Can someone delete my game section for me.

https://www.adventuregamestudio.co.uk/site/games/game/2407-leisure-suit-larry-1-ega-icelandic/

I was going to edit it but I always get now this error.


Fatal error: Uncaught Error: Call to a member function fetch_assoc() on bool in /var/www/adventuregamestudio.co.uk/public_html/pages/game/add_or_edit.php:174 Stack trace: #0 /var/www/adventuregamestudio.co.uk/public_html/pages/game.php(20): require_once() #1 /var/www/adventuregamestudio.co.uk/public_html/index.php(103): require_once('/var/www/advent...') #2 {main} thrown in /var/www/adventuregamestudio.co.uk/public_html/pages/game/add_or_edit.php on line 174
#3
I am now trying to write a code for player, when he needs to pick a 6 numbers.

When that happens a  game.inputbox appear where he needs to write numbers.

The player must insert only a numbers in that text box from 1-999 in that ,not letters.

What is the code to do that,  if I want player write only a numbers and avoid letters in that game text box?

Let say if the player write letters instead for numbers, I want to display 
Code: ags
Display"Sorry, you must only write numbers";


Help!
#4
Does any of you know the code for displaying  2 messages in same time in the game?  Or is that not possible?

What I mean I don't want the second message display after the first message. I want the second to appear with the first message together in same time.

Display("Hello, Who are you?");
Display("What is your name?");


#5
Has anyone here made a good card game with AGS? Like Black Jack or Solitaire?  :confused: :confused:

If so.  Would you be so kind and share a code or show me how you did it, please?  :-[


What I myself have done so far.  I created first a GUI and add made a sprites and  buttons for the cards  then I added one button wish I named bDeal.



And then I did this:


Code: ags
function bDeal_OnClick(GUIControl *control, MouseButton button)
{
if (Spil == 0)
{
BCards.Animate(VSPIL, 0, 5, eOnce);
Wait(40);
}
Spil++;

BCards.Visible = false;
BDSpil1.Visible = true;
BDSpil2.Visible = true;

BSpil1.Visible = true;
BSpil2.Visible = true;


  if(Vinningspil1 == 0){
   BDSpil1.Animate(VHJARTASPIL, 0, 0, eOnce)&&Heartace;
   BSpil1.Animate(VHJARTASPIL, 5, 0, eOnce)&&Heart6;
  BSpil2.Animate(VHJARTASPIL, 10, 0, eOnce)&&HeartGosi;
  }
  else if(Vinningspil1 == 1)
 {
   BDspil3.Visible = true;
    BDSpil2.Animate(VHJARTASPIL, 10, 0, eOnce)&&HeartGosi;
     BDspil3.Animate(VHJARTASPIL, 3, 0, eOnce)&&Heart4;
 }
 else if (Vinningspil1== 2)
 {   
   BDSpil4.Visible = true;
   BDSpil4.Animate(VHJARTASPIL, 12, 0, eOnce)&&HeartQueen;
   Display("You are Busted");
   
      }
    else if (Vinningspil1== 3)
    {

  BDSpil1.Visible = false;
  BDSpil2.Visible = false;
  BSpil1.Visible = false;
  BSpil2.Visible = false;
  BDspil3.Visible = false;
  BDSpil4.Visible = false;
  BCards.Visible = true;
  BCards.Animate(VSPIL, 0, 5, eOnce);
Wait(40);
BCards.Visible = false;
 BDSpil1.Visible = true;
  BDSpil2.Visible = true;
  BSpil1.Visible = true;
  BDSpil1.Animate(VHJARTASPIL, 0, 0, eOnce)&&Heartace;
   BSpil1.Animate(VHJARTASPIL, 5, 0, eOnce)&&Heart6;
  BSpil2.Animate(VHJARTASPIL, 10, 0, eOnce)&&HeartGosi;
  BDspil3.Visible = false;
  BDSpil4.Visible = false;
    }
 Vinningspil1++;
 }



#6
Just a simple suggestion.
But I'm getting tired of seeing both free completed game and games on sale in the same Forum
"Completed Game Announcements forum".

So my suggestion is could you add this two extra forum in the forum "Completed Game Announcements forum"?

"Free Completed Game Announcements"
and 
"Completed Game Announcements On Sale"

It would make the forum much easier for everybody who are looking for Completed free games and Completed games on sale.

Click here to see the image of my Forum suggestion

#7
I'm working now on a very difficult code now.




This is the text from when Larry in the "Leisure Suit Larry 1" is in the shop (Quick Mart) where he can buy condom and other stuff. ,)

I know already I need to add this in the player interact when he touch the object.

Larry:
After looking around to make certain you're alone, you quietly ask the clerk if the has any available behind the counter.

The Clerk:
'Sure, we got lubbers!'

Narrator:
(Obviously you've hit his area of expertise!)

Clerk;
'What kind of lubber you want? Smooth or libbed?'


Now here is my problem. Larry has to choose the kind of condom

Then the Clerk ask Larry 

'Colored or plain?'

then the clerk ask Larry

'Lubricated or rough-cut?'

and again he ask Larry

'Striped or plaid?'

and for last time he ask Larry

'Peppermint or spearmint flavor?'

Then after that he says

'Oakie, doakie Meester!'

'Hey, everybody!! This weird-o just bought a peppermint-flavored, striped, lubricated, colored, libbed lubber!!!'


Now the question is how can I let the clerk in the shop memorize what the player choose.  But as you know we can say different word.
This also happens when Larry are calling on sex-line on the phone. And he is asked a question which player can choose whatever he wants.

I really want to know the code for this.  But I have tried. And this is what I have done so far for the phone sex-line code. I don't work very well but this is a least a good start right?  But I don't know what else I can do next when the phone rings back and when it has memorized what the player typed.

Code: ags
String Phonenumber = Game.InputBox ("Enter a phonenumber:");
if (Phonenumber.CompareTo("5556969" ) == 0) {
Display("'Hello, you have reached the National Hot Line Sex Survey. Please answer the following questions. There may be a wonderful prize waiting for you!!'");  
Display("'What is the name of your favourite sex partner?'");
}
String Phonenumber1 = Game.InputBox ("");
if (Phonenumber1.CompareTo("" ) == 0) {
Display("'What is the best part of your partner's anatomy?'");
}
String Phonenumber2 = Game.InputBox ("");
if (Phonenumber1.CompareTo("" ) == 1) {
Display("'What do the two of you like to do together?'");
}
String Phonenumber3 = Game.InputBox ("");
if (Phonenumber3.CompareTo("" ) == 2) {
Display("'What is the best part of your body?'");
}
String Phonenumber4 = Game.InputBox ("");
if (Phonenumber4.CompareTo("" ) == 3) {
  Display("'And, finally, name your partner's favorite object.'");
}
 String Phonenumber5 = Game.InputBox ("");
 if (Phonenumber5.CompareTo("" ) == 4) { 
 Display("'Thanks for participating. Your prize is...'");
 Display("");
 Display("Hum. Looks like they hung up on you. Oh well. It was probably a bummer prize anyway!");
 }
 String Phonenumber6 = Game.InputBox ("Enter a phonenumber:");
 if (Phonenumber6.CompareTo("2096836858" ) == 0) {
 Display("'Hello. a pleasant voice responds. 'Sierra On-Line.'");
 Display("'We're not open right now, but if you'd call during business hours (and stip using this pretend telephone), we would be happy to sell you a 'Leisure suit Larry Hint Book.''");
 Display("'Written by Al Lowe, the author of Leisure Suit Larry, you know it at least tries to be humorous. The answers are invisible, until you mark them with the special pen provided, so you never have to worry about inadvertently learning something you didn't want to know.'");
 Display("'Thank you for calling Sierra On-Line, and for your purchase of 'Leisure Suit Larry in the Land of the Lounge Lizards.' Good bye.'");
 Display("Such blatant commercialism turns you on. You make a mental note to purchase on of those great, Al Lowe Hint Books!");
 }
}

 
#8
Hi all and Happy new year!

Does anybody know the code on this one?

What code do I use when I use a same item on same hotspot or object to get different messages?
I don't want a random messages to show up. I want the game to display another messages after I click on it again.

In case if you don't understand me.
Remember in Leisure suit Larry 1 EGA/VGA when you where in the toilet.  There was a messages on the walls there. And when you click on the wall you could read a different messages after each time you clicked on it.

And also when you clicked on the TV with the remote. You got a another messages after the last messages.





#9
Hi all.

I need help with this game. Limbo The Adventure Game .

How do I convince everyone that Heaven is real?
I have managed to convince the two men, but I cant find the others to convince them the Heaven is real.
I have convinced the guy with the sign and the old guy with a peg leg
Where are the others, and how can I convince them of the Heaven?

#10
 Has no walktrough be made of this game yet?

I'm stuck.

When am I going to use the blond wig to fool the Mr. McCullogh so I can use his computer again?

What is the password for the laptop with the mp3 music I found where fat drummer kid was.

I really like that game.



QuoteFribbi, why not open a thread in Hints&Tips?
QuoteAnyway
Quote

QuoteYou need the wig and something else later to trick McCullogh
Quote
QuoteIf you have shown a printout of the picture to the wife, talk to her again. If she goes to another room, follow her and talk to her again. Seduce her
Quote


(Ok sorry!).  :-[Done! :grin:


But I am still stuck.  :(

I already got the wig. But Stanley still doesn't want to wear it.
I have also went with that lady down to basement and now she is back in her bedroom and she don't want to talk to me.

You said I should follow her. When does she leave the bedroom?


#11
Edit.

Sorry I have deleted that game.

Moderator may delete this page for me.

http://www.adventuregamestudio.co.uk/site/games/game/1629/
#12
Please delete this account for me.

http://www.adventuregamestudio.co.uk/forums/index.php?action=profile;u=2325

I finally found my old account I lost for 3-4 years ago but I don't have the password or the email for it to use it again.

I have already regsistered on this new one. But since I'm using my new account I am using right now can any moderator delete  my old account for me.

Could you also delete the game link for  "The black sky". It is no longer available on the internet. Thanks!

#13
Site & Forum Reports / Chrome forum problem
Fri 25/05/2012 22:42:51
About this AGS forums.  Why does that not work on Google Chrome?

I'm using now the old Windows Explorer to be able to get in this brand new forums. But it works best with windows Explorer browser.

#14
Nice game.  ;D

But I am stuck now.

I have found the stamp, envelope and the money.

I need to find the name wich I can send it to.  

And where can I find a pen?  /Not sure if I have to find it.

And where is the garage remote?
#15
Hints & Tips / Fribbeldib (first part)
Thu 15/12/2011 01:18:57
I need help with color puzzle wich is in slot machine.

Does anyone have a screenshot of the right answer.
#16
Would it not be cool if there was a new board here wish could be called  "AGS code scripts"? 
Wish would only be for the AGS code script.

It would spare me a lot of time to find and search for a useful AGS codes and scripts then.

It was just a idea. 
#17
I am trying to make a GUI scroller buttons and textbox so I can scroll  a long text just like in that image demo from Baldurs Gate.

I need help with this . I just need the scrolling button code so it can work like this. Thanks  :)


#18
Hints & Tips / Palacin
Sat 22/01/2011 06:17:03
I didn't see any walkthrough or cheats for this game so excuse me for asking but has anyone played that game before?  I have no idea what I am suppose to do in the game.  I got only coin and nuts.    Talked to two guys.  That's it.

So a good hints from anyone from this world is well needed here.
#19
Hints & Tips / Cosmos Quest 4 demo
Wed 03/11/2010 03:59:00
Has anybody figured out the code number on the jail panel puzzle? I need help with that.  I know it has something to do with that note he finds in jail. But I can't figure out what is the number I'm suppose to press on to get me out of the jail.

#20
I am looking for code for a background effect.  You have hopefully played Space Quest 1 and 4. But both of those games had some background with a amazing whirlpool background effect.

Does anybody know what AGS code are used to do that?

Here is a image wich should show you and explain what I mean. But as you can see in this pic Roger Wilco has already started up space shuttle and this amazing rainbow colorful  whirlpool background effect happens then. I just wanted to know how this is done. That background effect happens also on the Sierra logo background.










SMF spam blocked by CleanTalk