Community
AGI Programming => Mega Tokyo AGI Archive => Topic started by: Corby on April 26, 2002, 04:42:20 AM
-
Is it possible to give a view a certain priority so that the ego cannot go behind it? Kind of like black lines when using picedit? I guess this would be done using set.priority
Also, how do you set the default speed to fast? Can this be done for just a certain room?
-
For the priority question: set.priority(4) should make it so that ego will not be drawn behind another view. But it may be possible for ego to walk over that view. It depends on what specifically you're trying to do.
For the speed, you need to set the variable cycle_delay. It is possible to change this in the middle of a logic, I believe, but it would be a good idea to save the player's old speed settings in a variable, so that the settings can be restored when the player leaves the room. You would do it something like this:
#define old_cycle_delay v200
if (new_room)
{
// whatever code is in your new room section
old_cycle_delay = cycle_delay;
// this is the fast speed setting
cycle_delay = 1;
}
// anywhere that the player is sent to a new room
cycle_delay = old_cycle delay;
new.room(...);
-
Thanks, that helped alot. I had a few dead bodies that looked really weird when the ego walked behind it. It looked like the bodies were floating sorta. Now the ego just walks over it. Seem a bit cruel but oh well!