I create a object in script, and I want to modify some value in the object instance I just create, but I don't know how to do it, could someone tell me what to do? Thanks.
PS: I'm not from a contry which speak English, so please forgive me if I say something wrong. =w=
Develop games in your browser. Powerful, performant & highly capable.
Hmm, do you mean in events or in actual Python script? In events it works like this:
[your event conditions ] -> Create object "Sprite1" or whatever it is
Any actions after this will be only applied to the newly created object:
[your event conditions ]
-> Create object "Sprite1"
-> "Sprite1" set private variable "Health" to "100"
-> "Sprite1" set X to "300"
-> "Sprite1" set Y to "200"
This will put the newly created sprite at 300,200 position and give it 100 health private variable (or whatever variables you give it).