Is there a command for making events aleatory? It should be a great step for making RPG games... I mean... Imagine I want to do a game like Pirates! by Sid Meyer. I would put a command that should work for calculate the result of a sea battle considering the cannons, the size of the ship, the skills of the capitan... Can that be done?
I also remember a room of Indy4 where Sophia must guess the fingers of the hand that Dr. Trottier hides. And it´s aleatory because i´ve saved the game and tested 1,2,3,4 & 5 and that didn´t work.
And, if this has been asked before, sorry, I´m not very into script.
I would like to know something like that as well, I remember the RANDOM comand from the spectrumBASIC wich was not trully random, it went more like a timer. :-\
but a comand like that would be really helpfull for me as well
Ags has a random function
Random(number);
gives a number between 0 and number
so if you wanted to do the 5 fingers picked randomly thing you could do
int fingersup = Random(4)+1;
and then ask the player for their guess and compare them
if (playerguess==fingersup) {Do the stuff for if they got it right;} else {do the stuff for if they got it wrong;}
it'd work something like that anyway
got it, I'll try to use it,
thanks scotch
How would I use this (if I could at all) to give a NPC 3 coords to randomly walk between?
IN REP. EXEC
if (character[NAME].walking==0) {
MoveCharacter(NAME,Random(319),Random(199));
}