Re: Shooter XT - Open sourced 2D Sidescroller Shooter for BGT beginners
Yeah some of the things here hurt my head. Like the array of enemies in the array of bullets simply to check if one is near the other. I haven't looked through all the code yet either.
One shortcut you can sometimes take and it does work in various languages, including Python is that things that return true or have more than zero elements, you can get away with something like:
if(var)
{
//statements
}
In Python, this will pass if the var is holding a boolean and it return true, if it's a non-empty list or string, and several other things.
if var:
# statements here
You can also flip flags like this in BGT:
var = !var;
Or in python:
var = not var
I don't know how or even if it is possible to do this next part in BGT, but it works in Python. OK so you flipped your flag and now you want to speak it so you could do:
lucia.output.output("on" if var else "off")
Lol hope that was correct, I don't use it commonly and sometimes have to play with it to get it to work.
Uh, why did I just write all this shit, idk getting tired I guess and head going in weird places.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector