Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: miguel on Thu 01/05/2003 12:39:59

Title: animating objects limitation?
Post by: miguel on Thu 01/05/2003 12:39:59
hello, I´ve got a room that has 4 still animated objects plus one that keeps going around. when I want to put another one it doesn´t work. no error message, it just doesn´t do anything. Are there limits to the amount of objects that you can animate?
Title: Re:animating objects limitation?
Post by: RickJ on Thu 01/05/2003 16:05:43
You should be able to animate all possible 10 objects.  I  can't tell why you are having this problem, from your description.
Title: Re:animating objects limitation?
Post by: miguel on Fri 02/05/2003 00:49:07
well, my script goes like this:


function movecamera() {
 SetObjectView(5,15);
 AnimateObject(5,0,10,1);
 }

//
//
//
int timer=0;  

function repeatedly_execute() {
  timer++;
 if (timer>=75)  timer=0;
 if (timer==0)    MoveObjectDirect(4,260,144,3);
 if (timer==74)    MoveObjectDirect(4,26,144,3);

}
//
// room script file
function monitores () {
SetObjectView(0,12);  
AnimateObject(0,0,10,1);
 }
//
function monitores2 () {
SetObjectView(1,12);  
AnimateObject(1,0,10,1);
 }
//
function monitores3 () {
SetObjectView(2,12);  
AnimateObject(2,0,10,1);
 }
//
//

function room_a() {
 // script for room: Player enters screen (after fadein)
monitores ();  
}
//
//
function bandejavoadora () {
 SetObjectView(3,11);
 AnimateObject(3,0,5,1);
 }
function room_b() {
 // script for room: Player enters screen (after fadein)
bandejavoadora ();  
}


function room_c() {
 // script for room: Player enters screen (after fadein)
monitores2 ();
 
}

function room_d() {
 // script for room: Player enters screen (after fadein)
monitores3 ();  
}

function room_e() {
 // script for room: Repeatedly execute
 
}

function room_f() {
 // script for room: Repeatedly execute
repeatedly_execute ();  
}

function room_g() {
 // script for room: Player enters screen (after fadein)
SetObjectIgnoreWalkbehinds (4,1);
 
}



function room_h() {
 // script for room: Player enters screen (after fadein)
movecamera ();
 
}

this are all my scripts for that room, some things I wrote in portuguese but it's only the function names, am I doing something wrong? maybe it's the place where I've put the scripts working (interaction menu?)?
Title: Re:animating objects limitation?
Post by: Gilbert on Fri 02/05/2003 04:08:33
hmmm did you add the functions into the script all by yourself or did you add several "Run script..." actions to one single event?

My guess is that probably (but I'm not sure) the engine will run only ONE of the scripts if there're multiple ones in the same event. Under most circumstances, you don't need to run several scripts in one event anyways.

You may try to delete the "run script..." actions in events with multiple ones until there's only one left. Then edit the scripts to include all necessary content.

For example, the content of your "Player enters screen (after fadein)" can be like this:

monitores ();  
bandejavoadora ();  
monitores2 ();
monitores3 ();  
SetObjectIgnoreWalkbehinds (4,1);
movecamera ();
Title: Re:animating objects limitation?
Post by: miguel on Fri 02/05/2003 15:50:44
it worked gilbot, I just did what you said and all the objects are animated and moving.
Super!
thanks a lot!