Moving sprites request.
#16
Posted 21 April 2012 - 10:52 PM
#17
Posted 21 April 2012 - 11:00 PM
#18
Posted 22 April 2012 - 01:31 AM
ffc script dogs
{
void run()
{
int frames = 0;
int a = 0;
while(true)
{
a = Rand(2);
frames ++;
if (frames > 0 && frames < 20 && a == 0) this->X ++;
if (frames > 0 && frames < 20 && a == 1) this->X --;
if (frames > 20 && frames < 40 && a == 0) this->X --;
if (frames > 20 && frames < 40 && a == 1) this->X ++;
if (frames == 41) frames = 0;
if (this->X > 256) this->X= 1;
Waitframe();
}
}
}
#19
Posted 22 April 2012 - 01:39 AM
wouldnt some kind of random movement function like this be easier?
ffc script dogs
{
void run()
{
int frames = 0;
int a = 0;
while(true)
{
a = Rand(2);
frames ++;
if (frames > 0 && frames < 20 && a == 0) this->X ++;
if (frames > 0 && frames < 20 && a == 1) this->X --;
if (frames > 20 && frames < 40 && a == 0) this->X --;
if (frames > 20 && frames < 40 && a == 1) this->X ++;
if (frames == 41) frames = 0;
if (this->X > 256) this->X= 1;
Waitframe();
}
}
}
Have you tested and confirmed that this is issue-free? Also mind if you give us the information on what arguments are what?
#20
Posted 22 April 2012 - 02:51 AM
#21
Posted 22 April 2012 - 05:43 AM
Left to right? Why not up and down too?
#22
Posted 22 April 2012 - 08:02 AM
#23
Posted 22 April 2012 - 10:41 AM
#25
Posted 22 April 2012 - 06:02 PM
Did you accidentally change those constants (starting with ANIMAL_ATTRIB_) again?
#26
Posted 22 April 2012 - 06:12 PM
I think it has something to do with the hopping...
#27
Posted 22 April 2012 - 06:17 PM
#28
Posted 22 April 2012 - 06:18 PM
And if that doesn't work, list all of your animal's attributes.
Edited by MoscowModder, 22 April 2012 - 06:18 PM.
#29
Posted 22 April 2012 - 07:37 PM
60
90
#30
Posted 22 April 2012 - 07:39 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users