My question is about the RPN registration module code. As it is now when you enter the numbers for the reg code you click on them with your mouse.
I want to know how to be able to type in the reg code with your keyboard, so that when you hit 1, it shows 1, and when you hit 5 it shows 5 and so on.
Here is the script from the section I need help with.
- Code: Select all
transp=0.99;
switch (cloneindex)
{
case 0: strcpy(regchar,"0"); break;
case 1: strcpy(regchar,"1"); break;
case 2: strcpy(regchar,"2"); break;
case 3: strcpy(regchar,"3"); break;
case 4: strcpy(regchar,"4"); break;
case 5: strcpy(regchar,"5"); break;
case 6: strcpy(regchar,"6"); break;
case 7: strcpy(regchar,"7"); break;
case 8: strcpy(regchar,"8"); break;
case 9: strcpy(regchar,"9"); break;
case 10:
strcpy(dummy,"");
if (strlen(regaskcode)>0) strncat(dummy,regaskcode,strlen(regaskcode)-1);
strcpy(regaskcode,dummy);
PlaySound2("data/pop3.wav",soundvolume,1,0);
break;
}
if (cloneindex<10) if (strlen(regaskcode)<5)
{
PlaySound2("data/click.wav",soundvolume,1,0);
strcat(regaskcode,regchar);
}
I originally thought each number was a seperate actor, which would be very easy to add a keydown event, but with each number being a clone of each other with the same script, I don't know how you would add a keydown event for each number.
Thanks everybody.