im have problem, im have on another layer1 script (if button has ben pressed destory object "car") (object "car" is be on layer2) and it's don't work, if im back from layer1 to layer2 car has don't destoroyed plz help
please help
You can use a global variable to retain data between layouts.
Upon destroying the car on the layout where the car doesn't exist, set the global variable to 1.
In layout 2 -
On start of layout, if global variable=1, destroy car.
Develop games in your browser. Powerful, performant & highly capable.
it's don't working, im tryed this, its have bugs
please help, after break, im must see a new car. (on start new car is hidden)
You can do this way:
Event sheet 1 / Layout 1 = Create a global variable and:
Button, On clicked -> Variable set value to 0
Event sheet 2 / Layout 2:
Compare variable -> IF = 0
- Sprite -> Destroy