how can I do to call an object with a line of code ?

Get help using Construct 2

Post » Wed Aug 05, 2015 3:17 pm

Hello (excuse my english),

how can I do to call an object with a line of code ?

for example : Event > On start layout > player&"global variable x" > set visible > true

it's possible ?

Thank you.
B
12
S
3
Posts: 147
Reputation: 2,026

Post » Wed Aug 05, 2015 3:48 pm

Yes, In construct the term is "picking" an object. It is a way of specifying which particular object or objects you want to apply an action to.

So in your case you would want to do

On start of layout ->
(sub event) System Pick by Evaluate -> Player.name = GlobalVariable -> apply actions

you can "pick" the player by its instance variable "name" or its UID, or a alot of other ways as well.

Image
B
87
S
44
G
16
Posts: 1,005
Reputation: 17,938

Post » Fri Aug 07, 2015 9:20 pm

Thank you !
B
12
S
3
Posts: 147
Reputation: 2,026


Return to How do I....?

Who is online

Users browsing this forum: dop2000, Jackriduk, NN81 and 37 guests