create obj at variable.x? HOW?!

This forum is currently in read-only mode.
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hi, im an old user of construct.

    I cant remember how to make the program create an object on x,y position where x should be a variable.

    for example i have a variable named HOR. and its value is 100

    I want to create a sprite object on position HOR, 0

    And no matter how i write HOR it doesnt work.

    I tried "HOR" i tried HOR.x i tried (HOR)

    WHAT COULD IT BE? It is like the simplest thing and i still forgot it.

    i just wasted an hour trying to do it and i am pissed enough to brake tables. can someone PLEASE HELP ME? how do i type the variable name so it gets accepted in the create an object?


    see what i mean?

    its not an object? how do i write HOR properly so it gets accepted as an x value

  • What type of variable is it? If it's a global variable, write: global('HOR')

  • Thank you for coming to my aid!

    I tried now its saying parameter of global isnt string... -_-

    Yes, i am using a global variable which value is 100 right now, to try to place a sprite on x,y where x is the variable, so it should be placed on 100,0

    and its not working again, im raging so hard!

    The reason im doing it its because i want to build an isometric map with tiny pieces changing the position with HOR

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • o my god finally! THANK YOU SO MUCH!

    the problem was i was using " instead of '

    now it works perfectly!

    as steve jobs would say it just WERKS!

    I am the developer of Invidia 422AC and i just want to say im coming back to build a better simcity type of game with construct 1

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