If randomnumbers[0] == 1 // If randomnumbers[0] == 2 // If randomnumbers[0] == 3 && PA_GetSpriteAnimFrame(0,0) == 80
basically what i want it to do is if the the randomnumbers[0] is 1 or 2 or 3 AND in the end if the sprite frame of sprite 0 = 80
If (randomnumbers[0] == 1 || randomnumbers[0] == 2 || randomnumbers[0] == 3) && PA_GetSpriteAnimFrame(0,0) == 80If SomethingHappens || If SomehtingElseHappensIf SomethingHappens || SomethingElseHappensYoshiInAVoid wrote:Also your code is very inefficient.
also, i'd like to point out that teens on here have little to no respect to older people.
so stop being cocky!
- come say that to this black belt face to face! i dare you!F*** you
Cilein wrote:Calm down I don't think he meant it offensively, although there was no point in the comment without explanation or suggestions to fix it so its justified to be irritated by it.
Cilein wrote:loop from 1 to 80 (give the variable a name like 'i')
if randomNumbers[0] == i ... and the rest of your code
end loop
this will create a variable called i (with the loop action), and cycle through the statements until the 'end loop' incrementing i by 1 each time until it hits the specified end, in this case 80. So the code will check if randomNumbers[0] == 1 then 2 then 3 and so on till 80. Saves a lot of space in your code, makes errors in typing less likely, easier to read and change the code and number of things to scroll through etc later.
Users browsing this forum: No registered users and 1 guest