Leisure Suit Larry 3 vga Cancelled

This is a public forum, where you can find out everything you wanted to know about making games. Please don't use this forum as a place to recruit new members.

Moderators: adeyke, VampD3, eriqchang, Angelus3K

Message
Author
Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#51 Post by Erpy » Sat May 15, 2004 7:56 pm

What exactly are you trying to create? Could you be a little more specific?

Image

User avatar
Fribbi
The Icelandic Guest
Posts: 1696
Joined: Thu Aug 09, 2001 7:49 pm

#52 Post by Fribbi » Sun May 16, 2004 7:51 pm

I am trying to create some kind of a heat meter. When Larry and Patti are finally together in the bed then suddenly some kind of heat meter showed up. And I wanted to know how can I program something like that for the game.
Last edited by Fribbi on Sun May 16, 2004 8:34 pm, edited 1 time in total.

Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#53 Post by Erpy » Sun May 16, 2004 8:12 pm

Oh that? You can do two things:

1) Draw that meter and create a few different "heat levels", then just turn those frames into an animation. (easy way)

2) Draw the meter as part of the background and make the entire area around the meter (but not the meter itself) a walkbehind with the baseline near the bottom of the screen. Then let a red object or character (just a red square or something) move behind the meter and it'll look like it fills up.

Image

User avatar
Fribbi
The Icelandic Guest
Posts: 1696
Joined: Thu Aug 09, 2001 7:49 pm

#54 Post by Fribbi » Sun May 16, 2004 8:44 pm

But what if I want to show the player how many % is on the meter with a a message like this message:
"50% is now compleated" ?

You know when I download some stuff from the internet it always display some meter bar with % and show me how many % has ben downloaded. I just wanted to know how can I program something like that.

Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#55 Post by Erpy » Sun May 16, 2004 8:57 pm

Well, there's another way, which can be kinda complicated. It's called RawDrawRectangle. You can use it to draw rectangles on the background. You just change the final two parameters each time you want the meter level to rise. (or the first two if the meter must be rising up)

Image

User avatar
Fribbi
The Icelandic Guest
Posts: 1696
Joined: Thu Aug 09, 2001 7:49 pm

#56 Post by Fribbi » Thu May 20, 2004 10:48 pm

Ok thanks Erpy.

Another question how can I let NPC leave from the screen like the fairy god mother did.

Image
I'm having trouble now with the natives on the beach and there are three of them who appear and they appear randomly and leave after each turn. And I don't know how to let just one of them appear on the screen. Help!!!

Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#57 Post by Erpy » Thu May 20, 2004 11:29 pm

Simple. If this character is called NATIVE and the room you're in is room 5, you can put this character in the room with

Code: Select all

character[NATIVE].room=5;
and move him out of the room with

Code: Select all

character[NATIVE].room=-1;
Of course, it's better if you make him walk off the screen first, so use the following code to move him into the screen.

Code: Select all

character[NATIVE].x=-40;
character[NATIVE].y=100;
character[NATIVE].room=5;
movecharacterblocking(NATIVE,50,100,1);
and the code below to make him leave.

Code: Select all

movecharacterblocking(NATIVE,-50,100,1);
character[NATIVE].room=-1;
Image

User avatar
Spikey
Insomniac Speed Demon
Posts: 1195
Joined: Tue Jan 27, 2004 10:23 pm
Location: Rotterdam, Netherlands
Contact:

#58 Post by Spikey » Thu May 20, 2004 11:31 pm

:| Erps you're up late.

Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#59 Post by Erpy » Thu May 20, 2004 11:33 pm

Not for long anymore, Mr. Look-who's-talking. :)

Image

User avatar
Fribbi
The Icelandic Guest
Posts: 1696
Joined: Thu Aug 09, 2001 7:49 pm

#60 Post by Fribbi » Fri May 21, 2004 6:36 pm

Wow thanks Erpy. :D And here is another question. ;)
What code shall I use when I let the player exchange clothes? Is it change character view or what else is it?

About the Natives. There are three of them who appear in the same room. On appear after the first go of the screen and another appear after him.

Should I use this command Wait(100); or something else.

PS: I decided to exchange the name on this thread because it has nothing to do with the Icelandic fonts any longer. And it seems to me Erpy we are the only guys who has answered here mostly.;)

Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#61 Post by Erpy » Fri May 21, 2004 8:47 pm

Wow thanks Erpy. And here is another question.
What code shall I use when I let the player exchange clothes? Is it change character view or what else is it?
Make two animations: One of the player exchanging clothes and the other one of the player walking with the alternative clothes. Let's say the exchanging animation is in Loop 3 of view 4 and the alternative walking animations are in view 5.

Code: Select all

Setcharacterviewex(EGO,4,3,ALIGN_CENTRE);//set character's view to the right view and loop
AnimateCharacterEx(EGO,3,0,0,0,1);//run clothes exchange animation
ReleaseCharacterView(EGO);//release view and...
ChangeCharacterView(EGO,5);//change the character's default view to the alternative walking view
About the Natives. There are three of them who appear in the same room. On appear after the first go of the screen and another appear after him.

Should I use this command Wait(100); or something else.
Perhaps do something like this:

Code: Select all

//code for moving native 1 out of the screen goes here

SetTimer(1,800);
Put this into the "repeatedly execute"-part of the room:

Code: Select all

if (IsTimerExpired(1)==1) {
//code for making native 2 appear goes here
}
PS: I decided to exchange the name on this thread because it has nothing to do with the Icelandic fonts any longer. And it seems to me Erpy we are the only guys who has answered here mostly
No need to put my name into the title; I'm not working on any game.

Image

Relight
Archival Expert
Posts: 2432
Joined: Fri Oct 05, 2001 8:21 am

#62 Post by Relight » Fri May 21, 2004 8:57 pm

LMAO - I did not read this thread until the title of it was changed :lol

This is just priceless...

Charlemagne
Canadian Pundit
Posts: 445
Joined: Sat Jan 24, 2004 8:25 am
Location: Ontario, Canada

#63 Post by Charlemagne » Fri May 21, 2004 9:02 pm

I was wondering where this three-page thread I'd never seen came from. Love the new title. :lol :lol

Klytos
Infamous Sheik of Australia
Posts: 1722
Joined: Tue Apr 22, 2003 3:43 pm
Location: Rockhampton Australia
Contact:

#64 Post by Klytos » Fri May 21, 2004 11:17 pm

I think maybe Erpy should just program the game, it might be quicker.

Rambaldi0503
The Heretic
Posts: 518
Joined: Sun Dec 28, 2003 12:03 am
Location: Hoboken, NJ
Contact:

#65 Post by Rambaldi0503 » Sat May 22, 2004 2:28 am

Klitos wrote:I think maybe Erpy should just program the game, it might be quicker.
At the very least, he should program his own game. The guy knows his stuff!

User avatar
Fribbi
The Icelandic Guest
Posts: 1696
Joined: Thu Aug 09, 2001 7:49 pm

#66 Post by Fribbi » Sat May 22, 2004 9:59 pm

No need to put my name into the title; I'm not working on any game.
I know Erpy but you have been helping me alot here so this is just a reward to you.
At the very least, he should program his own game. The guy knows his stuff!
I totally agree with you there. It even makes no sense to me if he isn't working on his own game after all this information he has given to me. :)

Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#67 Post by Erpy » Sat May 22, 2004 10:19 pm

You know what they say: "Those who can do, do while those who cannot just tell others what to do."

Image

Rambaldi0503
The Heretic
Posts: 518
Joined: Sun Dec 28, 2003 12:03 am
Location: Hoboken, NJ
Contact:

#68 Post by Rambaldi0503 » Sun May 23, 2004 5:22 pm

Erpy wrote:You know what they say: "Those who can do, do while those who cannot just tell others what to do."

Image
:rollin :rollin

rugged
Defense Minister Status
Posts: 555
Joined: Mon Mar 31, 2003 10:55 am
Location: Christchurch, New Zealand

Well done

#69 Post by rugged » Tue May 25, 2004 5:53 am

Well done to both Erpy and Fribbi. We done fribbi for being so commited to learning ags and well done Erpy for answering a zillion questions !!

User avatar
Fribbi
The Icelandic Guest
Posts: 1696
Joined: Thu Aug 09, 2001 7:49 pm

#70 Post by Fribbi » Sun May 30, 2004 4:14 pm

:lol Hehehe! Thanks! I only asked because I just a rookie on this. The only thing I hate to do is drawing all those trees for the game I am currently working on.

Here is the newest screenshot from my game.

Image

If you want to see the others just check out my new updated homepage.
Last edited by Fribbi on Mon Jun 07, 2004 8:51 pm, edited 2 times in total.

timosity
Peasant Status
Posts: 12
Joined: Tue Dec 10, 2002 1:55 pm
Location: Sydney
Contact:

#71 Post by timosity » Thu Jun 03, 2004 1:06 pm

Just as a clue as I'm not sure if you've thought about this, but you'll notice the native scenes are nonblocking which means Larry can still walk around interact etc while the natives and Tawni are doing their animations.

Here's just one little sample of some code in the repeatedly execute for the beach room, it shows how you can have a nonblocking scene with npc's animating and moving.

It might not make sense without other related scripts, or better descriptions, but it gives you an idea of a technique to use (this is for one of the natives)

Code: Select all

if (GetGlobalInt(40)==1){
SetTimer(1,0);
SetTimer(2,0);
SetTimer(3,0);
}

if (IsTimerExpired(1)==1){
character[PIN].room = 17;
character[PIN].x = 340;
character[PIN].y = 133;
SetGlobalInt(21,1);
SetGlobalInt(24,1); // for any native on beach
MoveCharacterDirect(PIN,277, 139);
SetGlobalInt(33,1); // for next stage
}


if (GetGlobalInt(33)==1){
if (character[PIN].walking == 0) {
game.speech_text_gui=4;
DisplaySpeechAt(125,70,70,PIN,"'Souvenirs!'");
Wait(1);
MoveCharacterDirect(PIN,248, 147);
SetGlobalInt(33,2); // for next stage
}
}



if (GetGlobalInt(33)==2){
if (character[PIN].walking == 0) {
DisplaySpeechAt(125,70,70,PIN,"'Souvenirs!'");
Wait(1);
MoveCharacterDirect(PIN,222, 157);
SetGlobalInt(33,3); // for next stage
}
}


if (GetGlobalInt(33)==3){
if (character[PIN].walking == 0) {
DisplaySpeechAt(76,70,168,PIN,"'Get your genuine Nontoonyt souvenirs!'");
Wait(1);
MoveCharacterDirect(PIN,180, 165);
SetGlobalInt(33,4); // for next stage
}
}


if (GetGlobalInt(33)==4){
if (character[PIN].walking == 0) {
DisplaySpeechAt(76,70,168,TAW,"'Oh, wow!' exclaims Tawni, 'SOUVENIRS!'");
DisplaySpeechAt(76,70,168,TAW,"'Whatcha selling? she asks the peddler.");
SetGlobalInt(33,5); // for next stage
}
}


if (GetGlobalInt(33)==5){

SetCharacterView(PIN,71);
AnimateCharacter(PIN,0,5,0);
SetGlobalInt(33,6); // for next stage
}


if (GetGlobalInt(33)==6){
if (character[PIN].animating == 0) {
DisplaySpeechAt(76,70,168,PIN,"'Genuine plastic souvenirs, handmade in the city of rsubfqsdf.'");  
SetGlobalInt(33,7); // for next stage
}
}  


if (GetGlobalInt(33)==7){

SetCharacterView(TAW,75);
AnimateCharacter(TAW,0,5,0);

SetGlobalInt(33,8); // for next stage
}


if (GetGlobalInt(33)==8){
if (character[TAW].animating == 0) {
SetCharacterView(TAW,76);
DisplaySpeechAt(76,70,168,TAW,"'What was that?' asks the girl.");
SetGlobalInt(33,9);
}
}


if (GetGlobalInt(33)==9){
AnimateCharacter(PIN,0,5,0);
SetGlobalInt(33,10); // for next stage
}


if (GetGlobalInt(33)==10){
if (character[PIN].animating == 0) {
DisplaySpeechAt(76,70,168,PIN,"'(Hong Kong.)' the vendor mumbles under his breath."); 
DisplaySpeechAt(76,70,168,TAW,"'Oh, no matter. As long as they're genuine, You never know when I might get back this way and I just love buying souvenirs!'"); 
DisplaySpeechAt(76,70,168,PIN,"'All together, that comes to...' the peddler pauses, considering what the market will bear, '...three hundred dollars, American. And, I'll cover the taxes for you!'");
DisplaySpeechAt(76,70,168,TAW,"'Really? That expensive? Well, ok, if you say so.'"); 
SetGlobalInt(33,11); // for next stage
}
}

if (GetGlobalInt(33)==11) { 
AnimateCharacter(PIN,0,5,0);
SetGlobalInt(33,12); // for next stage
}


if (GetGlobalInt(33)==12){
if (character[PIN].animating == 0) {
DisplaySpeechAt(76,70,168,PIN,"'Hey, thanks a lot,' says the vendor. 'Have a nice day!'");
SetGlobalInt(33,13);
}
}


if (GetGlobalInt(33)==13) {
SetCharacterView(TAW,75);
AnimateCharacterEx(TAW,0,5,0,1,0);
SetGlobalInt(33,14);
}

if (GetGlobalInt(33)==14) {
if (character[TAW].animating == 0) {
ReleaseCharacterView(PIN);

MoveCharacterDirect(PIN,340, 133);
SetTimer(2,800);
SetGlobalInt(33,0); // so it doesn't repeat
SetGlobalInt(24,0); // for native leaving beach
SetGlobalInt(26,1); // action complete so doesn't start over on re entry

}

}

Snarky
Royal Servant Status
Posts: 87
Joined: Thu Jan 22, 2004 1:59 am

#72 Post by Snarky » Thu Jun 03, 2004 2:11 pm

I'm just getting into AGS, and the script samples on this thread are really interesting. Thanks, Erpy and Tim!

Actually, maybe I can ask my own question: I want to have a character jumping in a somewhat realistic fashion (moving fast up, then more and more slowly, then stationary for a moment, and then falling faster and faster). I'm currently using something like:

Code: Select all

SetCharacterView(...)       // Set jump view
MoveCharacterBlocking(...)  // Move fast up
SetCharacterSpeed(...)      // Go slow
MoveCharacterBlocking(...)  // Move slow up
Wait(...)                   // Be stationary at the top for a moment
MoveCharacterBlocking(...)  // Move slow down
SetCharacterSpeed(...)      // Go fast
MoveCharacterSpeed(...)     // Move fast down
My problem is that there's a little jerk in the movement between each of the move commands, a brief pause. This makes it look like the computer hangs for a moment twice during each jump.

Is there a better way to do it? I don't want to use an animation, since the jump is very large.

Erpy
Forum Administrator
Posts: 11434
Joined: Tue Sep 25, 2001 8:28 pm
Location: The Netherlands

#73 Post by Erpy » Thu Jun 03, 2004 2:41 pm

I take it it's a straight jump then. (straight up)

Have you tried something like this?

Code: Select all

short jumpcounter;

SetCharacterView(EGO,x);//jumping view
AnimateCharacterEx(EGO,0,1,0,0,1); //character kneels and jumps, remaining in his "taking off" frame
while (jumpcounter<=10) {
character[EGO].y-=2;//set character's y-position 2 pixels up
jumpcounter++;
Wait(1);
}

while ((jumpcounter>=11)&&(jumpcounter<=20)) {
character[EGO].y--;//set character's y-position 1 pixel up
jumpcounter++;
Wait(1);
}

while ((jumpcounter>=21)&&(jumpcounter<=30)) Wait(1); //hangs in air for a moment

while ((jumpcounter>=31)&&(jumpcounter<=40)) {
character[EGO].y++;//set character's y-position 1 pixel down
jumpcounter++;
Wait(1);
}

while ((jumpcounter>=41)&&(jumpcounter<=50)) {
character[EGO].y+=2;//set character's y-position 2 pixels down
jumpcounter++;
Wait(1);
}

AnimateCharacterEx(EGO,0,1,0,1,1); //reverse "taking off" animation to show EGO landing
ReleaseCharacterView(EGO);
jumpcounter=0;

Perhaps this kind of thing will work if you fiddle around with the numbers a bit. I can't check if it really works, but it may look better than your method of jumping when tweaked right.

Image

Snarky
Royal Servant Status
Posts: 87
Joined: Thu Jan 22, 2004 1:59 am

#74 Post by Snarky » Thu Jun 03, 2004 3:28 pm

Direct manipulation of the character coordinates by accessing the fields. Wicked. :hat

Thanks Erpy, I'll try that out!

Relight
Archival Expert
Posts: 2432
Joined: Fri Oct 05, 2001 8:21 am

#75 Post by Relight » Thu Jun 03, 2004 4:42 pm

Yup, just remember what the AGS documentation says :D
AGS rulez wrote:(1) The character X&Y co-ordinates may be modified as long as the character is stationary; changing these while the character is moving will cause it to start moving off in the wrong direction.

Locked