hello
i think something is very strange... or i must have a really bad luck..
ive been using the random but it seems to go always for the same numbers, or sometimes it goes for those nr/nrs more times...
ive tried the rand() from D&D warduke (random encouter)
but i think the random has something to do with with the time in the level...
the random numbers above are being used by an npc that talks to the player....
has soon has i enter the level i always run towards that npc to talk to him it should take me about 3 seconds before i reach him... so i always get the same random number depending on openbor elapsetime i think ?
are the randoms above correct ?
#------------//----CURTIN-RANDOM-ELLE---//-----
int r = rand()%15+15; //----3 options
#------------//----CURTIN-DRESS-RANDOM---//-----
int r = rand()%15 + 15; //--5 options
''''''''''''''''''''''''''''''''''''''___««««««««««««««««
thanks...
iam on a very old laptop with a very weak internet connection... this is the only way i can reply most webpages bottuns arent working...
whites dragon random seems a good option... ie already finished the level and moved on.. now i know how the random works... but i it still looks like to me the rad()10 «««-9««+9 goes for the +9 more times... ive mode those 3 cups thing were you have 3 cups with an item inside then the cups move really fast and the player has to find the item when they stop... and middle cup was going to the left side more time times
i had to made .... int r = rand()%10+5; «««« to get him to go left« right the same times
«««««««««««««««««««««««««««««««««««««««««««««««««««
//---------------------------move---------left-790--//---middle-940---//---right-1090-------------------------------
if ( Ani == openborconstant("ANI_FOLLOW20"))
{
void frame = getentityproperty(self,"animpos");
int pch2 = loadsample("data/sounds/cup.wav");
int x = getentityproperty(self,"x");
int cupmv = getglobalvar ("mv1");
int cupmv2 = getglobalvar ("mv2");
int cupmv3 = getglobalvar ("mv3");
int r = rand()%10+5;
if (x==940)
{
changeentityproperty(self, "velocity", 0, 0);
if (r >= 5 && cupmv3 == 3)
{
setglobalvar ("mv1", 1);
changeentityproperty(self, "velocity", -3-aggro);
setglobalvar ("mv3", 0);
playsample(openborconstant(pch2), 0, 100, 100, 100, 0);
}
else if (r < 5 && cupmv3 == 3)
{
setglobalvar ("mv2", 2);
changeentityproperty(self, "velocity", 3+aggro);
setglobalvar ("mv3", 0);
playsample(openborconstant(pch2), 0, 100, 100, 100, 0);
}
int cupmv = getglobalvar ("mv1");
}
if (cupmv == 1 && x <= 790 )
{
setglobalvar ("mv3", 3);
changeentityproperty(self, "velocity", 3+aggro);
setglobalvar ("mv1", 0);
}
else if (x <= 790 )
{
setglobalvar ("mv3", 3);
changeentityproperty(self, "velocity", 0, 0);
}
int cupmv = getglobalvar ("mv2");
if (cupmv2 == 2 && x >= 1090 )
{
setglobalvar ("mv3", 3);
changeentityproperty(self, "velocity", -3-aggro);
setglobalvar ("mv2", 0);
}
else if (x >= 1090 )
{
setglobalvar ("mv3", 3);
changeentityproperty(self, "velocity", 0, 0);
}
} //follow 20 end
«««««««
p.s. aggro equal entity aggression + or - for the cups to move faster if the player finds he item
i think something is very strange... or i must have a really bad luck..
ive been using the random but it seems to go always for the same numbers, or sometimes it goes for those nr/nrs more times...
ive tried the rand() from D&D warduke (random encouter)
#------------//----CURTIN-RANDOM-ELLE---//-----
anim follow3
@script
void self = getlocalvar("self");
if (frame == 1)
{
int r = rand()%15+15;
if (r >= 0 && r < 10)
{
setglobalvar ("ellerad1", 1);
}
else if (r >= 10 && r < 20)
{
setglobalvar ("ellerad1", 2);
}
else if (r >= 20)
{
setglobalvar ("ellerad1", 3);
}
}
@end_script
loop 1
delay 12
offset 30 70
bbox 0 0 0 0
frame data/bgs/99gclub/may/empty.gif
frame data/bgs/99gclub/may/empty.gif
frame data/bgs/99gclub/may/empty.gif
#------------//----CURTIN-DRESS-RANDOM---//-----
anim follow4
@script
void self = getlocalvar("self");
if (frame == 1)
{
int r = rand()%15 + 15;
if (r >= 0 && r < 5)
{
setglobalvar ("elledrss1", 1);
}
else if (r >= 5 && r < 10)
{
setglobalvar ("elledrss1", 2);
}
else if (r >= 15 && r < 20)
{
setglobalvar ("elledrss1", 3);
}
else if (r >= 20 && r < 25)
{
setglobalvar ("elledrss1", 4);
}
else if (r >= 25 )
{
setglobalvar ("elledrss1", 5);
}
}
@end_script
loop 1
delay 20
offset 30 70
frame data/bgs/99gclub/may/empty.gif
frame data/bgs/99gclub/may/empty.gif
frame data/bgs/99gclub/may/empty.gif
but i think the random has something to do with with the time in the level...
the random numbers above are being used by an npc that talks to the player....
has soon has i enter the level i always run towards that npc to talk to him it should take me about 3 seconds before i reach him... so i always get the same random number depending on openbor elapsetime i think ?
are the randoms above correct ?
#------------//----CURTIN-RANDOM-ELLE---//-----
int r = rand()%15+15; //----3 options
#------------//----CURTIN-DRESS-RANDOM---//-----
int r = rand()%15 + 15; //--5 options
''''''''''''''''''''''''''''''''''''''___««««««««««««««««
thanks...
iam on a very old laptop with a very weak internet connection... this is the only way i can reply most webpages bottuns arent working...
whites dragon random seems a good option... ie already finished the level and moved on.. now i know how the random works... but i it still looks like to me the rad()10 «««-9««+9 goes for the +9 more times... ive mode those 3 cups thing were you have 3 cups with an item inside then the cups move really fast and the player has to find the item when they stop... and middle cup was going to the left side more time times
i had to made .... int r = rand()%10+5; «««« to get him to go left« right the same times
«««««««««««««««««««««««««««««««««««««««««««««««««««
//---------------------------move---------left-790--//---middle-940---//---right-1090-------------------------------
if ( Ani == openborconstant("ANI_FOLLOW20"))
{
void frame = getentityproperty(self,"animpos");
int pch2 = loadsample("data/sounds/cup.wav");
int x = getentityproperty(self,"x");
int cupmv = getglobalvar ("mv1");
int cupmv2 = getglobalvar ("mv2");
int cupmv3 = getglobalvar ("mv3");
int r = rand()%10+5;
if (x==940)
{
changeentityproperty(self, "velocity", 0, 0);
if (r >= 5 && cupmv3 == 3)
{
setglobalvar ("mv1", 1);
changeentityproperty(self, "velocity", -3-aggro);
setglobalvar ("mv3", 0);
playsample(openborconstant(pch2), 0, 100, 100, 100, 0);
}
else if (r < 5 && cupmv3 == 3)
{
setglobalvar ("mv2", 2);
changeentityproperty(self, "velocity", 3+aggro);
setglobalvar ("mv3", 0);
playsample(openborconstant(pch2), 0, 100, 100, 100, 0);
}
int cupmv = getglobalvar ("mv1");
}
if (cupmv == 1 && x <= 790 )
{
setglobalvar ("mv3", 3);
changeentityproperty(self, "velocity", 3+aggro);
setglobalvar ("mv1", 0);
}
else if (x <= 790 )
{
setglobalvar ("mv3", 3);
changeentityproperty(self, "velocity", 0, 0);
}
int cupmv = getglobalvar ("mv2");
if (cupmv2 == 2 && x >= 1090 )
{
setglobalvar ("mv3", 3);
changeentityproperty(self, "velocity", -3-aggro);
setglobalvar ("mv2", 0);
}
else if (x >= 1090 )
{
setglobalvar ("mv3", 3);
changeentityproperty(self, "velocity", 0, 0);
}
} //follow 20 end
«««««««
p.s. aggro equal entity aggression + or - for the cups to move faster if the player finds he item