
Leisure Suit Larry 3 vga Cancelled
Moderators: adeyke, VampD3, eriqchang, Angelus3K
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.
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.

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.

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.
"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.
Ok thanks Erpy.
Another question how can I let NPC leave from the screen like the fairy god mother did.

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!!!
Another question how can I let NPC leave from the screen like the fairy god mother did.

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!!!
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 and move him out of the room with
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.
and the code below to make him leave.

Code: Select all
character[NATIVE].room=5;
Code: Select all
character[NATIVE].room=-1;
Code: Select all
character[NATIVE].x=-40;
character[NATIVE].y=100;
character[NATIVE].room=5;
movecharacterblocking(NATIVE,50,100,1);
Code: Select all
movecharacterblocking(NATIVE,-50,100,1);
character[NATIVE].room=-1;

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?
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.


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.

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.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?
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
Perhaps do something like this: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.
Code: Select all
//code for moving native 1 out of the screen goes here
SetTimer(1,800);
Code: Select all
if (IsTimerExpired(1)==1) {
//code for making native 2 appear goes here
}
No need to put my name into the title; I'm not working on any game.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

-
- Canadian Pundit
- Posts: 445
- Joined: Sat Jan 24, 2004 8:25 am
- Location: Ontario, Canada
-
- The Heretic
- Posts: 518
- Joined: Sun Dec 28, 2003 12:03 am
- Location: Hoboken, NJ
- Contact:
I know Erpy but you have been helping me alot here so this is just a reward to you.No need to put my name into the title; I'm not working on any game.
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.At the very least, he should program his own game. The guy knows his stuff!

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

Here is the newest screenshot from my game.

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.
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)
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
}
}
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:
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.
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
Is there a better way to do it? I don't want to use an animation, since the jump is very large.
I take it it's a straight jump then. (straight up)
Have you tried something like this?
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.

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;
