Question from a noobie, and it's really just about how Game Maker forces you to write things in certain ways. I'm just working my way through a tutorial so hopefully you don't mind if I throw this question out there.
Let's say I have destroyed all of the enemies on the screen, and I would like a couple more to pop up once they are all gone. Something simple like this would be in my code:
if (not instance_exists(oEnemyBlue))
{
instance_create(view_xview[0]+596, view_yview[0]+96, oEnemyBlue);
instance_create(view_xview[0]+300, view_yview[0]+200, oEnemyBlue);
} My question is regarding the
view_xview[0]+596 portion of the code. Why can't I just say the following?
view_xview 596Why is the
- +insertnumberhere[/i] necessary when creating an instance at a particular set of coordinates? Maybe this is silly, but if 0+596= 596, why is the extra part necessary? It's just confusing because I'm trying to learn when to add parentheses, brackets, etc., and it's a little more complicated when I have to also know when I can have numbers, and when I have to add them (to zero?).
Thanks! I'm having a lot of fun with all of this.