Original Post
Hey, I'm currently working on a BlitzBasic (because its simple and easy to use) Top-Down 2D RPG. While I was writing the code to stop when you hit a solid object I ran into a problem. The Langauge has problems using any combination of more than 3 if.. else.. elseif... clauses. Now my problem is I need to check all 4 sides for the collision, but I can't use 4 if clauses. I thought that it might handle the Switch statement easier, however I would need it to return a number to tell me which side i have hit (which in turn makes me write 4 if statements). What I have been trying looks something like this. if (player\x <= npc\x) then player\x = player\x else... This is setup in a function that is only called when there has been a collision. And works just fine with two or three of these clauses but when I put in the fourth that looks nearly the same, the language skips a few. Any suggestions of some alternative routes around using the if statements?