how can i refence existing object by code

0 favourites
  • 8 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hello,

    I just downloaded the program and I find it very interesting.

    I have read a bit 'of documentation about but still I could not understand

    How can I programmatically referencing existing objects in the game?

    the only way to write code is to write a javascript plugin?

  • Read this

  • Thank you,

    but I have not found anything in that guide about referencing objects programmatically

  • ? Maybe explain your question in detail, because the way you describe it is simple picking of objects in the event sheet. If you wanna add custom javascript functions then yes, you have to write a plugin - most stuff can be done through the event system, though.

  • I Have to use custom javascript.

    For example if I have a textbox on the layout I want to understand how to invoke a setText

    and if I have a button I want to know how to write code when fired onclick event

  • You can use custom javascript in the SDK, but Construct 2 IDE is an event-driven system, designed to eliminate the need for coding.

    There are numerous other systems that cater for 'proper' coders. This system is designed for maximum accessibility for the majority of non-coders out there.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you,

    I like the simplicity of construct2 but would like to use javascript to integrate functionality with smartfoxserver.

    So I have to study how to use javascript sdk and how to load external js file

  • The browser object can execute external .js: scirra.com/manual/110/browser

    for security reasons it is safer to code a plugin with the SDK instead

    scirra.com/manual/15/sdk

    you should ask your questions about sdk development in the sdk development subforum, though maybe your question is already answered there

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