Help with Object Animations

Started by , Fri 05/08/2005 00:57:38

Previous topic - Next topic

Datadog


Hello all,

Right now I'm trying to do a simple test: move a spinning logo from one side of the screen to the other.  Unfortunately, I can't figure out how to do this.  The only things the program lets me import into a room are sprite objects and characters, not views (unless I'm missing something obvious, which I can't seem to find.)  What process would I use to import this animation into the scene, and move it around as an object, not a character?  I'm not very good with the programming language, so if there's programming involved, a quick explanation or a link to some good information (aside from the tutorials) would be appreciated.


monkey0506

#1
Maybe something like:

oLogo.SetView(VIEW, LOOP_NUM, FRAME);
oLogo.Animate(LOOP_NUM, DELAY, REPEAT, BLOCK, DIRECTION);
oLogo.Move(X, Y, SPEED, BLOCK, WHERE);

Now obviously there's a lot of mumbo-jumbo in there that isn't actual code.  The terms in bold are terms that should be replaced with the values you want to use.  The italicized terms are terms you may or may not want to include (they are optional parameters).  Now let me explain some things:

oLogo -  Here "Logo" should be replaced by the name of your object.

VIEW - This is the number of the view you want to assign to the object.

LOOP_NUM & LOOP_NUM - This is the loop in the view that you want the object to animate with.  For the function SetView this is optional (for assigning the initial picture of the object (assigned by the FRAME parameter)), whereas for the Animate function it is required.  Be careful not to mix these up.  So for example if you put the animation for the logo in view 5, loop 1, you would replace "VIEW" with a '5' (in the SetView function) and "LOOP_NUM" with a '1' (in the Animate function).

FRAME - This is the frame (of loop LOOP_NUM (SetView function), view VIEW) to be used for the picture of your object (it will change the picture assigned to your object if you supply these parameters).

oLogo - See "oLogo" above.

LOOP_NUM - See "LOOP_NUM & LOOP_NUM" above.

DELAY - This is the delay of the animation.  A higher number means that the animation will run slower.  Also this will be added to the delay for each frame (set in the view pane of the game editor), so keep that in mind.

REPEAT - Whether you want the loop to repeat or not.  This can be either "eOnce" (for running the animation once) or "eRepeat" (for running the animation continuously).

BLOCK - Whether you want the script to block other commands or not.  If you pass "eBlock" then no other script commands will be run until the object finishes animating.  If you pass "eNoBlock" then the script will continue running as normal while the object animates.

DIRECTION - The direction you want the animation to play in.  This is either "eForwards" or "eBackwards" and the animation will play either forwards or backwards (respectively.

oLogo - See "oLogo" above.

X - The 'x' co-ordinate to move the object to.

Y - The 'y' co-ordinate to move the object to.

SPEED - The speed at which the object will move (uses the same scale as the character walk speeds).

BLOCK - See "BLOCK" above.  Note that for the Move function this is an optional parameter.

WHERE - Where the object can move.  This can be either "eAnywhere" which will make the object ignore walkable areas, or "eWalkableAreas".

You may want to repeatedly use the Move function with integers to store the X and Y values.  I hope this helps.  I also suggest reading the manual, the tutorial, and the BFAQ.

monkey_05_06

TerranRich

Also, do the tutorials on the site before trying anything on your own. Believe me, they'll help.
Status: Trying to come up with some ideas...

Datadog


Ah, believe me.  I have gone through the tutorials.  They've been keeping me from posting on here for a while now.  Unfortunately, when it comes to the actual programming language, my brain is dead in the water.  I can't even get this one script to work.  It keeps telling me "oLogo" is an undefined token, even after if I rename the object using several variations.

monkey0506

#4
Name the object something like "Logo".  The 'o' is prepended by the system for use in your scripts.

Edit:  Unless of course I misunderstood you.

SMF spam blocked by CleanTalk