Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

visible property of objects

Explorer ,
Nov 20, 2020 Nov 20, 2020

Simple question:

I have a button and a text (Tostop the carnage press the Stop button)I want these 2 objects to be invisible first and then either to fade in or to jsut be visible after playing the carnage for 10 seconds 
So I typed in ACtions
Keyframe 1.
stop_btn.visible = false;
stop_txt.visible = false;

 

Keyframe at the end of the frames where the "carnage"happens:

count ++

If (count == 300){
stop_btn.visible = false;
stop_txt.visible = false;
}
(The idea is to let the user see the carnage for 10 seconds and then give him a chance to press "Stop" to end it.

 

But the ábove' did not work at all - it brought out a strange error message after compiling. 
I finally changed the setup so that the button always shows.
But for future experiments - how would an expert solve this problem?

 

Kind regards, William-Michael

 

 

409
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 20, 2020 Nov 20, 2020

Sorry It should, of course, read 

count ++

If (count == 300){
stop_btn.visible = true;
stop_txt.visible = true;
}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 20, 2020 Nov 20, 2020

One further question 
I continually keep losing my stage. And no no CTRl +Z will get it back.
Is there not any method to get it back - I mean Window is filled with panels - but there is no entry saying "stage".
Kind regards,

William Michael (yes, I am new here) 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2020 Nov 21, 2020

OK - re. the losing of the "stage"'  - I think you have to just continually try to move panels apart - so may be this is how you find a "lost atage".
William Michael.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 21, 2020 Nov 21, 2020

So there's an error message, that presumably tells you exactly what the problem is, but you're going to ignore it and you're not going to tell us what it is.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 21, 2020 Nov 21, 2020

Hi Clay.

Interesting skull.
Well the message for turning a button instance  on an off was:
Scene 1, Layer 'actions', Frame 1, Line 20, Column 4 1050: Cannot assign to a non-reference value.
Scene 1, Layer 'actions', Frame 1, Line 9, Column 2 1050: Cannot assign to a non-reference value.

 

One further question:
Why is it that using a motion tweeen on the same keyframe blocks buttons and user input into textboxes ? 

William Michael

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 22, 2020 Nov 22, 2020

And the lines of code that the error messages were calling out is WHAT, exactly?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 22, 2020 Nov 22, 2020
LATEST

Hi Clay,

If it is the motion tweenyou are referring to - there is no error message - the error is that the buttons are just blocked - the same is valid for the input textfield: you cannot put the cursor into it. 

If it is button instances - they are single lines like   go_btn.visible = false/true;

William Michael   

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines