Creating a puddle animation

Started by Dervish, Mon 24/09/2007 06:59:21

Previous topic - Next topic

Dervish

I am trying to animate a drop falling into a puddle in the background, but can only use 4 frames to animate the background is there any thing else I can do?  Can you Animate an Object? If so How?

monkey0506

#1
Quote from: Dervish on Mon 24/09/2007 06:59:21Can you Animate an Object?

Yes.

Quote from: Dervish on Mon 24/09/2007 06:59:21If so How?

By doing a little something we here at the American Girl Scout Society like to call: reading the manual.

Object.Animate, Object.SetView, and maybe even Object.Visible, Object.Transparency, Object.X, and Object.Y.

The exact animation method you want to achieve is up to you, but basically as long as the object is visible, not completely transparent, and is shown on-screen (within the (X, Y) boundaries of the shown area of the room) then you basically just need to set a view and then use the Object.Animate function.

If you don't know how to use scripting, then it may be possible to do so using the Interaction Editor. Look for something like "Object - Animate" or the like. I don't use the IE (I generally try to avoid anything with those initials :P) so I'm not 100% sure if the option is available. If it's not, set up a "Run Script" interaction and script it. The examples given in the manual should be sufficient to get you going...but if you're completely lost...feel free to ask for further assistance.

Dervish

#2
Haha Yeah I actually just downloaded the manual and am reading it.  One other question.
How do you assign a view to an object? which I will probably find out after reading more. but ya'll might be able to answer me quicker.

EDIT:
Nevermind I think I found it.  Another instance of Read the manual First :)

EDIT 2:
Ok Last Stupid question I swear... well probably not..

anyway I got the.
object[1].SetView(7);
object[1].Animate(0, 5, eRepeat, NoeBlock);

but where the hell do I put the script.  I tried putting it in the room script editor but it tells me
Error (line2): Parse error: unexpected 'object'
so that leads me to believe it needs to be else where...
also I don't want the player to interact with it I just want the object to animate

Mod Edit: Please don't double - nevermind TRIPLE post

Gilbert

Function calls (commands) must be used within functions, you can't just place it anywhere.

From what I understand you want to make it animate continuously without stopping, right?

In that case, you may try putting that in the "Player enters room (before fadein)" event.

(Assuming you're using AGS V2.72) Click the "interaction" button (the one marked with 'I') in the room and double click "Player enters room (before fadein)", choose "run script". Then click "Edit script...", put the codes there and save the script.

Dervish

Thank you and Gracias and all that... Sorry I am new but ya'll have been great help

monkey0506

Sorry about the sarcasm, but we get these types of questions literally all the time. Don't be sorry about being new though. Everyone has to start somewhere. In addition to what you've already got, you can use the Object.Clickable property to make the object ignore mouse-clicks:

Code: ags
object[1].Clickable = false;


If you decide you want to let the user interact with it at a later point in your game you could inverse that like so:

Code: ags
object[1].Clickable = true;


Glad to have been of some service...even if all I really did was direct you to help yourself...;)

P.S. Just FYI you're not really supposed to post multiple messages right in a row like that (with no responses from anyone else in-between). If you look at the top-right corner of your post you'll see a link that says "Modify". You can use that to edit your posts. If it's been several days (at least 4 or 5) since anyone has responded and you still need help then it's probably okay to post again. I'm not anyone important, just trying to give you a heads up. :=

Ashen

#6
I've combined the triple post. As monkey said, use the MODIFY option in future. Whether being a moderator makes me someone important, who knows, but those are the rules. (Although, 24 hours is given as a reasonable time to wait, not 4 or 5 days...)

Quote
Haha Yeah I actually just downloaded the manual and am reading it.

The manual comes with AGS - if you've got the editor, you've got the manual. So there's no reason not to have read it before your first post. And, since all your questions are answered in it, or the BFAQ: Locked.

EDIT: OK, I've just seen you posted a 'Manual not working' thread a couple of days ago. Still, it's available on-line in a couple of places.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk