d-soldier wrote:.. I originall put this script on a timer for a filled-region actor, and it didn't do anything... so I then moved it to the create-actor script (as instructed) amd still doesn't do anything... Did I do something wrong here?
int n;
n=rand(100);
if (n=0)...





pixelpoop wrote:thanks Sgt Sparky,
Just to clarify,
in the if statement it should read n==0
when declaring what n is equal to you would use a single equals
note: I have edited my original code with this correction.





xscreen = rand(view.width);
yscreen = rand(view.height);




x=rand(view.width)+view.x;
y=rand(view.height)+view.y;

Game A Gogo wrote:smarty party




switch( var holding a rand value)
{
    case 0:    createactor;
                 break;
    case 1:    createactor;
                 break;   
    case 2:    createactor;
    default : break;
}
Users browsing this forum: No registered users and 1 guest