Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SLaMgRInDeR on Sun 04/05/2003 13:40:50

Title: Animation Problem/ character over walkbehinds?
Post by: SLaMgRInDeR on Sun 04/05/2003 13:40:50
hi, im trying to get it so that when you use a certain object on a a certain hotspot it plays an animation wich i have made, the only problem i have is im not sure how to make it into a flic animation, i have it as a GIF and i have the frames, in AGS i have made it into a view and have the animations uploaded as sprites, but how can i make it so that either it plays the view, or how can i turn it into a flic?
thanx,
SLaM
(   (   ( <( -_-)> )   )   )
*ps i looked in the manual and couldnt find anything on this.

EDIT: I also need to get a character to look like he's sitting on a chair, but the chair is a walkbehind, is this possible?
thanx,
SLaM
(  (  ( <( -_-) > )   )   )
Title: Re:Animation Problem
Post by: AJA on Sun 04/05/2003 14:28:43
Uh... is it a fullscreen animation? If so then you should save your animation as flic, mpg or avi. At least Animation Shop can save you gif animation into a flic or avi. And then you can use the PlayFlic or PlayVideo depending on the format you'll use.

-EDIT-

ps. Animation Shop comes with Paint shop pro if you didn't know that.
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Sun 04/05/2003 14:47:48
thanx, but (this will sound stupid but i only started using AGS this week!) once i have the flic, mpeg, or avi, how do i get it into AGS so that i can tell it to play it? as you cant load animations into the sprite manager or anything.
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: Ishmael on Sun 04/05/2003 16:41:40
If it is a fullscreen anim, put a script in the interactions that that checks if the object is right, and if it is, the it plays the anim. If it is just that the char animates when you use the object, script with SetCharacterView() and ReleaseCharacterView()... (was it like that..?)

function hotspot#_whatever-was-here
// use inv on hotspot
 if(character.inv_activated==12) { // if the object to use is number 12
   SetCharacterView(EGO, 7); // if the animation wanted to perfom is in view 7...
   AnimateCharacter(EGO,2,0,0); // ... loop 3. Read the AnimateCharacter discription too
   while (character[EGO].animating)
     Wait(1);
   ReleaseCharacterView(EGO);
 }

umm.... does that code btw even work?
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Sun 04/05/2003 17:30:18
argh, sorry, thanx but no thanx, i cant use the scripting apart from conversations, i need to know wich selections and things to make in the interaction editor to make it play a full screen animation (i also need to know how to get the full screen animation into AGS), when i use a certain object on a certain hotspot. (exept the certain object on certain hot spot i know how to do.)
sorry about that.
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: Ishmael on Sun 04/05/2003 17:33:05
I thought I saw somthing about this in the manual.... See the PlayFlic() discription in the manua for some info on this... Damn, I know how to do this, but I can't tell it to others....  :(

----- EDIT after Jimi's post down there V -----

Damn damn me....... I am too used to use the search...
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Sun 04/05/2003 17:49:56
ok, just to save me checking throught the whole manual, which section is it in?
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: Jimi on Sun 04/05/2003 17:52:30
Text script functions --> Multimedia functions.  ;)
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Sun 04/05/2003 18:01:50
taa. ok iv found that, but still, how do i get a flic or whatever into AGS?
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: Ishmael on Sun 04/05/2003 19:31:42
This is from the manual:

QuotePlayFlic
PlayFlic (int flic_number, int options)

Plays a FLI or FLC animation. The game checks for FLICx.FLC and FLICx.FLI (where X is FLIC_NUMBER) and if it finds one, plays it.
OPTIONS has these meanings:

0  player can't skip animation
1  player can press ESC to skip animation
2  player can press any key or click mouse to skip animation
+10 (ie.10,11,12) do not stretch to full-screen, just play at flc size

This is identical to the room interaction command "Play FLI/FLC VAL". The game is paused while the animation plays.
Example:

PlayFlic (2,1);

will play flic2 and the player will be able to skip the flic by pressing the ESC key.

Its all there. (I think)
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Sun 04/05/2003 19:51:37
yeh, thats what i read, but what i need to know is how to get the flic into AGS.
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: Ishmael on Sun 04/05/2003 20:04:09
[Under this patch are so may ugly words, that I am ashamed of myself] You put the flic into the game dir and name it flic1.flc for example. Then you use the command PlayFlic(1,what-ever-u-choose); to play it... its so simple...
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Sun 04/05/2003 20:27:36
ok, can u tell me where the flic actually goes to (what value the variable has to be made to)
because the things im putting in, it either dose nothing, or crashes!
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Sun 04/05/2003 21:09:06
ok, lemme start again, this time ill go into more detail, only read it if ur gonna help tho as if your not and you want to play the game after then ittl spoil it...

Spoiler
you have to use the item "Dulo with key" on "Eject-o-matic Chair" and i want it to play a clip of the character "Dulo" walking over to the "Eject-o-matic chair"
[close]
what would be the best way to do this?
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: AJA on Mon 05/05/2003 18:08:10
Okay... read carefully:

1. Go to room editor and select the hotspot/object which is the eject-o-matic chair.
2. Then click the interactions button.
3. Select use inventory on object from the interaction editor.
4. Select "Conditional - if inventory item was used" and set the inventory item number. Press OK.
5. Open the "Do nothing" interaction and select run script.
6. Click edit script.
7. Add line "PlayFlic(FLICNUMBER,OPTIONS);" changing FLICNUMBER to the number you named your flic (eg. flic1.flc -> 1) and OPTIONS to the options you wish to be used.
8. Save the script.
9. Press OK.
10. Press Close
11. Save the game
12. Test

That's how to play a flic, but you want just to move the character there? If that's all then use the MoveCharacter and MoveCharacterEx functions. And just to help you with scripting download the ScriptEditor (see my signature). It'll help you a lot when looking for different functions...
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Tue 06/05/2003 16:30:53
thanx, it was just the play ing the flic i was stuck on, ill try it now.
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Tue 06/05/2003 16:48:02
ok problem, i put the flic in the ags dir, called it flic1.flc (and its the 1st flic in there) and still it says "unspecified symbol 'flic1'"
any idea whats going on?
(  (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: Ishmael on Tue 06/05/2003 17:01:06
did you type PlayFlic(flic1....);?

And AGS dir..?

put it in the game dir, where all the room files are... and type PlayFlic(1....); as the command... I use .... because the rest of the params are inrelevant in this case...
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Tue 06/05/2003 20:04:25
yeh i typed that, and i meant the game dir, i think its somthing to do with the thing i used to convert it into a flic. any ideas apart from whole screen animations, as it is only the character im animating, buthe has to move across the screen.
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem
Post by: scotch on Wed 07/05/2003 00:38:18
you shouldn't actually write flic1..
if it's called flic1.flc you should use
PlayFlic(1,0);

The error you're getting is caused by you putting it in wrong, not the flc file being bad.
Title: Re:Animation Problem
Post by: SLaMgRInDeR on Wed 07/05/2003 16:12:05
aha! thanx, but now it says "ERROR:(i hate that word!) FLI/FLC animation play error" when you get to where its sposed to play it, and i cant think of anything that would be wrong, also the "(1,0)" goes brownish-red so im taking that as i typed it right due to the way "return" turns blue.

edit: ok i sorted out THAT problem by simply moving the character (duh, wh the hell didnt i think of that before?!) but i still need to know whats wrong for the next time i acually need to use an animation.

i now need to also know how to make certain characters, objects ect apear over walk behinds. i want dulo to look like hes sitting downbut the thing i want him to sit on is a walk behind, is this possible of do i have to change the background to have him as part of it?
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem/ character over walkbehinds?
Post by: Ishmael on Fri 09/05/2003 20:13:16
The animation: Was the flic bigger than the game resolution? (I dont know if this has somthing to do with it...)

The walkbehind-thing: You must draw the walkbehinds in the areas-editor in the room editor, set the baseline of the walkbehind under the point in which standing chars shoud be drawn behind. Then also check that the char has not got the "ignore walk-behinds" chacked in the cahr editor
Title: Re:Animation Problem/ character over walkbehinds?
Post by: SLaMgRInDeR on Sat 10/05/2003 12:37:56
so i have to make it so that the sitting frame of the character has an invisible patch at the bottom so that its under the baseline?
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem/ character over walkbehinds?
Post by: Ishmael on Sun 11/05/2003 08:59:51
um.... no..?

You need to draw the walkbehind into the background, just like you draw all the walkable areas and hotspots. Then, you need to set the baseline BELOW the point where he is. All char abowe the baseline will be drawn behind walkbehinds.
Title: Re:Animation Problem/ character over walkbehinds?
Post by: SLaMgRInDeR on Thu 15/05/2003 17:59:23
youre not making any scence, if i set the bseline below whenre i want him to be, he'll be behind it, i dont want him behind it, i want him infront of it.

i want it too look like this: http://www.angelfire.com/ultra/slamgrinder/DOA-_Pic_for_help_1.jpg
but im pretty sure it's going to turn out like this:
http://www.angelfire.com/ultra/slamgrinder/DOA-_Pic_for_help_2.jpg
Title: Re:Animation Problem/ character over walkbehinds?
Post by: Ishmael on Thu 15/05/2003 19:38:00
Just put the chat there, no walkbehidns.... tahts it....
Title: Re:Animation Problem/ character over walkbehinds?
Post by: Proskrito on Fri 16/05/2003 09:37:50
Search SetCharacterIgnoreWalkbehinds function inthe manual
Title: Re:Animation Problem/ character over walkbehinds?
Post by: SLaMgRInDeR on Sat 17/05/2003 16:44:01
TK: i cant, cause you need to walk around as the player character first, and go behind it, and then do something to make the other character go there and sit there.
Prosk:ill check it out, thanx.
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem/ character over walkbehinds?
Post by: Ishmael on Sun 18/05/2003 09:04:36
Oh.... set the baseline above the point where the char should be on the chair, below the point where the player char should stand to be behind it...
Title: Re:Animation Problem/ character over walkbehinds?
Post by: SLaMgRInDeR on Sun 18/05/2003 10:28:31
yeh, but its not that simple, as you saw in the pic, he is a small character and dosent even come underneath the seat, let alone under the legs where the baseline needs to be.  :-\
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem/ character over walkbehinds?
Post by: Ishmael on Sun 18/05/2003 18:31:28
So check the ignore walk-behinds in the char editor...
Title: Re:Animation Problem/ character over walkbehinds?
Post by: SLaMgRInDeR on Mon 19/05/2003 18:23:50
i could, but then i would have to make sure that he never in the whole game went behind a walk behind wouldnt I? also, where is that box? the only Igrors I can see are Ignore room scaling and Ignor room Lighting.
(   (  ( <( -_-)> )  )  )
Title: Re:Animation Problem/ character over walkbehinds?
Post by: Ishmael on Mon 19/05/2003 18:24:44
yes...
Title: Re:Animation Problem/ character over walkbehinds?
Post by: Proskrito on Mon 19/05/2003 20:08:19
Quote from: Proskrito on Fri 16/05/2003 09:37:50
Search SetCharacterIgnoreWalkbehinds function inthe manual
with that, i meant that you could open ags editor, press F1 to open the help file, click on the "index" tab, type "SetCharacterIgnoreWalkbehinds" , press enter, and then stop making this topic getting bigger and bigger  ;)
I think that is the function you need.
Title: Re:Animation Problem/ character over walkbehinds?
Post by: SLaMgRInDeR on Tue 20/05/2003 21:30:00
ok thanx, i checked it out, that problems solved but i still need to know whats wrong with the animations, i think its just the progamme im using to make the flic, as its just something i downloaded off the net. Im putting Adobe Premier on soon so I'll make it in that and see if it works.
(   (   ( <( -_-)> )   )   )
Title: Re:Animation Problem/ character over walkbehinds?
Post by: SLaMgRInDeR on Sat 24/05/2003 22:05:14
ok, it works now. (yey)
(   (   ( <( -_-)> )   )   )