Heardie and AW, if you try to run my code remember that it only works on a specific tile at the moment. Locutus said he'd take a look at it to add random locations.
AW when you get the error about EQ_func.slc...did you create the EQ_func.slc file and enter the code? It was near the bottom of the code posting. Counting up from the bottom }, go up 19 lines including blanks. Everything below that line (EQ_func.slc) goes in EQ_func.slc. I probably should have made it more clear that you need 2 files.
I would have liked to use a for loop for the buildings but didn't see numbers for them anywhere. I didn't look real hard though. That wasn't the part that took long to do and I don't know whether it would make the game run slower. Maybe if the random number was for the bldg near the end of the list???
Random - I was assuming that Random(8) would give me a chance at 0,1,2,3,4,5,6,7,8. From this site:
· INT Random(range)
Return a random number from 0 to range.
I didn't think I'd get something like 2.37 and have it rounded. I'm pretty sure I got an 8 on my 18th turn in one test. I can't say for sure since I felt pressured and didn't get to make the message I had intended "reports of a magnitude 8 earthquake have come in from sector 3, 47". Anyway, I think random(any number) gives you "any number" + 1 (for zero).
On the last Heardie msg about structures - I found that sometimes you have to use your own variable instead of the built-in variables. In this case tmpPlayer.cities or something. I have no idea when or whatever, I just experiment when I get errors.
I'm stepping away from this for a few days. I'm helping playtest the Alex scenario and I need to play. I also wanted to look more closely to see if any of the other stuff in scenario.slc can be put into functions. When I get the msg or any other changes to the EQ mod I'll post them. Probably before Friday, shouldn't take long for the msg.
AW when you get the error about EQ_func.slc...did you create the EQ_func.slc file and enter the code? It was near the bottom of the code posting. Counting up from the bottom }, go up 19 lines including blanks. Everything below that line (EQ_func.slc) goes in EQ_func.slc. I probably should have made it more clear that you need 2 files.
I would have liked to use a for loop for the buildings but didn't see numbers for them anywhere. I didn't look real hard though. That wasn't the part that took long to do and I don't know whether it would make the game run slower. Maybe if the random number was for the bldg near the end of the list???
Random - I was assuming that Random(8) would give me a chance at 0,1,2,3,4,5,6,7,8. From this site:
· INT Random(range)
Return a random number from 0 to range.
I didn't think I'd get something like 2.37 and have it rounded. I'm pretty sure I got an 8 on my 18th turn in one test. I can't say for sure since I felt pressured and didn't get to make the message I had intended "reports of a magnitude 8 earthquake have come in from sector 3, 47". Anyway, I think random(any number) gives you "any number" + 1 (for zero).
On the last Heardie msg about structures - I found that sometimes you have to use your own variable instead of the built-in variables. In this case tmpPlayer.cities or something. I have no idea when or whatever, I just experiment when I get errors.
I'm stepping away from this for a few days. I'm helping playtest the Alex scenario and I need to play. I also wanted to look more closely to see if any of the other stuff in scenario.slc can be put into functions. When I get the msg or any other changes to the EQ mod I'll post them. Probably before Friday, shouldn't take long for the msg.
Comment