Variable Definitions

0 favourites
  • 5 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • While I got the hang of some SC2 basics, I don't seem to be able to find some variable definitions by searching for them in the manual.

    For example:

    1) I was trying to understand the coding behind the Panning With Touch Controls example, which is pretty straightforward, but I could not find anything on the Touch.X("UI"). What is UI? Doesn't come up in the manual. I understand Touch.X, of course.

    Second example:

    2) This tutorial...

    Smoke Trail Tutorial

    refers to a lot of built in coding in SC2 itself (instance variables, indices...)

    In trying to understand the code, I could not find anything on "parent" and I searched all instances of it in the manual. I sort of understand it, but it makes me wonder how many other things I don't know.

    I would like to understand the code and what it's doing rather than just blindly copying people's examples every time I need something.

    I did some programming in BASIC back in Commodore 64 days, but as a top level language I figure SC2 should not be that hard.

    Where do I go to find out what's under the hood and how it works?

    Does a tutorial have to exist to describe it?

    Basically, rather than learning about everything piece by piece from other people's code, I'd like the whole breadth of it.

  • "Scroller" as in Scroller.Y would be another example from the Space Blaster demo.

    Absolutely nothing comes up in the manual on keyword search.

  • If you don't understand what "parent" do in that "Smoke Trail Tutorial" you should really start here Beginner's guide to Construct 2

  • "UI" is the layer name.

    X("layer")

    Y("layer")

    XAt(index, "layer")

    YAt(index, "layer")

    XForID(id, "layer")

    YForID(id, "layer")

    Return the current position of a touch in layout co-ordinates, with scrolling, scaling and rotation taken in to account for the given layer. The layer can be identified either by a string of its name or its zero-based index (e.g. Touch.X(0)). The At expressions can return the position of any touch on a layer given its zero-based index, and the ForID expressions return the position of a touch with a specific ID.

    https://www.scirra.com/manual/119/touch

    'parent' in that example is an instance variable that has been added to the Particles object.

    https://www.scirra.com/manual/73/instance-variables

    And "Scroller" is a just the name of a sprite.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alright, guess I was having a brain fart.

    (This explains all the bad vibes I was getting <img src="smileys/smiley17.gif" border="0" align="middle" />)

    This is what happens when you post late and are exhausted.

    But thanks. This makes it clear.

    (I'm not a youngin btw, so things that seem obvious to people may not be so much for me.)

    I was going through some other examples where people were doing things in a fancy way with function calls and what not and I thought this was referring to some built-in functionality I could not find anything about.

    I still don't understand the purpose of the "scroller" sprite in the Space Blaster example and when you go to far up, the ship appears to jump down, but no biggie. I already set up custom boundaries.

    I'm still having trouble with custom touch controls. It works the way I set it up, but sporadically for one of the boundaries.

    I'll post an example in a bit for critique.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)