Magistross's Recent Forum Activity

  • It's definitely something that should be added to the System object, something like "Snapshot canvas area", that triggers the same "On canvas snapshot" event.

    Here's a rather hacky way to do it with ExecJS. Note that it only works with WebGL off.

  • All the generation logic is done in a single tick, and no display update is ever done, so the only text you'll see is the last one.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Use sin() to get the Y component.

  • That's what the last "else" is there for. You just need to complete it with the condition of your choice. On the top of my head, I see your sprite is mirrored, so you might consider setting it to :

    Else
    Player is mirrored 
            -> Set Bullet angle to 180[/code:3ble85qo]
  • You might consider using a variable to store the "Enemy" UID to which your Enemy_Head is linked. I don't think containers work really well with families.

  • Bundle them all together, no overlap ever possible.

    [attachment=0:q75k3s1e][/attachment:q75k3s1e]

    Last "else" statement is there if you want to add a default direction.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It's mostly a personnal preference, it's not more nor less performant either way. But on larger projects, a clean global namespace is a blessing, for obvious reasons.

  • Local variables are just that, their scope is limited to where they were declared. The main reason to use them is to not clutter the global namespace. There also exists static local variables, their scope are also limited to their declaration block but they don't get reinitialised to their default value.

    As for using a function instead, I would probably have gone that way too. But Toddler did not want to clutter his function namespace with a function that he probably only use for one particular context. So I provided an alternative !

  • MultipleChoice flagExecute is a local variable. It get initialized to 0 implicitely every tick, no need to do anything !

  • Local scope vs. global scope

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies