help with walkbehinds

Started by piraatlife4me, Fri 03/10/2003 16:29:23

Previous topic - Next topic

piraatlife4me

Hey everyone! I am new totally new to AGS and was wondering if anyone out there help me out I am having a problem with trying to have a a NPC run an animation loop behind a walkbehindable area in a room. The mask is draw out but when I animate a character view it overides it. Is there a certain command for running this  I just can't figure it out.  Also does anyone know how to make an idle animation work between an animation a game display message, and another game display message.  I am basically trying to animate a guy behind a desk talking on a phone.  I want him to stop talking and pause a little bit and then start talking again.  If anyoneout there knows I really would appreciate it thanks alot
danny

Minimi

Hi there

1 - Try changing the baseline of the walkbehind area!
2 - You can put in the wait command like this :

wait(15);

Wich means... the program waits for 15 loops... you can make this higher or lower according to the length of the break

piraatlife4me

Hey Tanks alot Minimi! I set the baseline and it totally worked!  I really apperciate it.  One other thing though I am having a bit of a hard time with placing the wait command in.  I have a bunch of actions running in the room interaction and when I choose the run script option in between some actions, place the wait command in like this between the brackets like this wait(15); it keeps tellin me error.  I think there is something I am leaving out in the script.  I just have this cutseen going on where a guy is talking on the phone.  He picks up a ringing phone talks and then waits to simulate him listening to other person on the other end.  If you know a way to correctly place this command in it would really solve my little problem? Thanks again for responding I really appreciate it.
danny winebarger

p.s. If you have a room with hide/player character checked under room settings how do you enable him again in the same room at a later time.  Upon entry to the room I want him hidden after animating some NPC's I want him to appear and be totally functional.  If you know an easy way to fix this it would really help me out thanks.

Minimi

#3
You can do this actually in 2 ways. You can do the code like this to actually let the wait and then display the next message :

 // script for room: First time player enters screen
AnimateCharacter(1,5,1);
DisplayMessage(1)
wait(15);
DisplayMessage(2);


Or you can run a dialog. In this dialog you can for example make another character and then hide it in the room, doesn't matter what graphic. When you called the dialog, for example dialog 1, you can let write the dialog for example like this.


Man1: "Hello"
Man2: "bla bla bla"
Man1: "Have you seen my wife?"
Man2: "bla bla bla..."
Man1: "What you slept with my wife??"
Man2: "bla bla bla"
Man2: "bla bla bla"
wait(15)
Man1: "NO! She's already married to me, you jerk!"
stop


In the example above I made usage of a dialog, wich allows you to also show what the other one says... you can ofcourse also just only show the man on the phone talking by putting a wait between every line he says.

I hope you'll understand what I explaint to you. As for further help, try pressing F1 within AGS, for the helpcontent. Browser through there. You'll find most of your answers in there! GL with AGS!

piraatlife4me

Hey Minimi! Its Dan here again! Sorry to bother you again but I totally tried that and it didn't work.  For some reason I just get script error when I put in a AnimateCharacter command at the beginng of the code.  Everything is set up right I think there is something I am leaving out in the script.  Also I was wondering how you can set up under room interactions a way to just add a run script comand inbetween  a Game-display message command with just a Wait (15); in the script and nothing else so it would go
Character-Quick animation
Game-Display Message
run script(have just a Wait (15);)
Game-Display Message
I tried to do this and for somereason it dos'nt understand what I am asking it to do.  The reason I need it this way is because I want the other person on the phone to not say anything because I don't want the player to know what they are saying its part of the story.  I want to add soundfx instead when the character is listening to create like a charlie brown type of phone effect.  Your way works but its not really what I am needing.  Anyways thanks alot again ANd thanks for the quick response back.
Daniel Winebarger

p.s
Do you know a descent setting for basic believable rain using the snowrain plugin.  Because my game is 320 by 240 resolution and my rain looks like leaves.  Its brown how do you get it so it will atleast come out white or blue.  If you know that would sure help thanks alot

Scorpiorus

#5
Quotep.s. If you have a room with hide/player character checked under room settings how do you enable him again in the same room at a later time. Upon entry to the room I want him hidden after animating some NPC's I want him to appear and be totally functional. If you know an easy way to fix this it would really help me out thanks.
You could leave the hide option unchecked and try the next way:

on player enters room (before fade-in) - run script:

gs_globals[49] = character[GetPlayerCharacter()].x;
character[GetPlayerCharacter()].x = -1000; // hide player


later, just after another character has finished animating:

run-script:

character[GetPlayerCharacter()].x = gs_globals[49]; // show him again




About the telephone talkie, could you provide a bit more info?
As I understand a man is talking to the phone (background idle animation), and then at some point (what time? what triggers it?) there pre-scripted scene occurs:
- Message is displayed
- Pause (with/without man animation?)
- Message is displayed

then after, the idle animation starts again

and all these (except display message) should be executed in the background, ie the player can control his character, right?


QuoteAlso I was wondering how you can set up under room interactions a way to just add a run script comand inbetween a Game-display message command with just a Wait (15); in the script and nothing else so it would go
Character-Quick animation
Game-Display Message
run script(have just a Wait (15);)
Game-Display Message
I wouldn't rely on the order when there is a run script action between. Due to how AGS works internally it might happen that the run script will be executed last, so it's preferable to script the whole thing in one run script block. Just for reference. :P


Quotep.s
Do you know a descent setting for basic believable rain using the snowrain plugin. Because my game is 320 by 240 resolution and my rain looks like leaves. Its brown how do you get it so it will atleast come out white or blue. If you know that would sure help thanks alot
Is your game in 256 colors? Actually, you have to set the raindrop views first. Look at the snow/rain demo game there are loops for each type of the snowflake or raindrop. Import your raindrop graphics, make an appropriate view, then inside the game_start() function (global script):

function game_start() {
 srSetRainDefaultView(view, loop); // replace view and loop with your own values
}

~Cheers

SMF spam blocked by CleanTalk