I'm working on an idea I have for a script (and want to do the actual scripting of most of the product), but I'm lost on how to implement a dice roll (a d3) and storing the number as a local variable. If you can give me just that little snippit, I should be able to write the rest of it (and then show off the idea that I've got on the vault).
thanks in advance for the information.
Alassirana
random numbers becoming local variables?
Débuté par
Alassirana
, août 02 2011 07:11
#1
Posté 02 août 2011 - 07:11
#2
Posté 02 août 2011 - 07:19
nRoll = d3();
SetLocalInt(oObject, nRoll);
SetLocalInt(oObject, nRoll);
#3
Posté 02 août 2011 - 07:36
Thank you so very much...hopefully I'll get the rest of this scripted and on the vault today...it's the idea for a fully functional 3 cup shell game....complete with spot check option.
#4
Posté 02 août 2011 - 07:46
Sounds nice.
#5
Posté 02 août 2011 - 09:11
_Knightmare_ wrote...
nRoll = d3();
SetLocalInt(oObject,?? nRoll);
*caugh*
try, SetLocalInt(oObject,"VarName" ,nRoll);
#6
Posté 02 août 2011 - 09:20
I'll double check, but I think that I did have it fixed in my copy, but thanks.
#7
Posté 02 août 2011 - 09:22
Yep, I had it correct.
#8
Posté 03 août 2011 - 12:07
Lightfoot8 wrote...
_Knightmare_ wrote...
nRoll = d3();
SetLocalInt(oObject,?? nRoll);
*caugh*
try, SetLocalInt(oObject,"VarName" ,nRoll);
DOH!!! Good catch. I even read it back to myself and didn't notice... That's what I get for typing with one hand and trying to deal with a 3 month old baby with the other...
#9
Posté 03 août 2011 - 12:21
That's quite all right. Good luck with the baby.
#10
Posté 03 août 2011 - 12:37
_Knightmare_ wrote...
... That's what I get for typing with one hand and trying to deal with a 3 month old baby with the other...
Been there done that....twice.
Modifié par GhostOfGod, 03 août 2011 - 12:37 .





Retour en haut






