I have two questions on some expressions.

0 favourites
  • 6 posts
From the Asset Store
Add this awesome sound effects to make your visual novel come to life!
  • I'm fairly new to Construct 2, and have 2 questions.

    ______________________________________________________________

    I am trying to do a menu that has a couple things you can choose from, I have a global variable that sets to what is selected. Now on click I want it to spawn that item. How could this be done?

    ______________________________________________________________

    ______________________________________________________________

    I used to advance program in GameMaker:HTML5(scripting) and I was wondering how do I do a "On create event like GameMaker"??? So lets say I create a new object(In game) and on this creation I want to execute some code with it. How could this be done?

    ______________________________________________________________

    Thank you, DylanT <img src="smileys/smiley1.gif" border="0" align="middle" />

  • On click set global to 1

    global = 1 system create object, set global to 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh, I get where your coming from.

    If Global = 1 then {

    Spawn this...

    }

    Ok I was thinking about this too, but thought there would be a 'custom' spawn. Thank you newt.

    Also, "to anyone" Is there an "on create object" command I have not been able to get it... So when I spawn an object I trigger "this" ?

  • Sorry, no on create. Thats the variables job.

  • Also, "to anyone" Is there an "on create object" command I have not been able to get it... So when I spawn an object I trigger "this" ?

    If you want something to happen every time you spawn a specific object, just add another event under the same condition.

    Global variable = 1:
    -> Create object X
    -> Do other things
    

    Or, if you want it to happen every time you spawn ANY object, just make another variable that changes every time you spawn an object.

    (Or if you have a license, you can use families)

  • Ok thank you everyone.

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