R3vo/Sandbox1 – User

From Bohemia Interactive Community
< User:R3vo
Revision as of 10:12, 17 May 2021 by R3vo (talk | contribs) (Replaced content with "for User Interface Event Handlers {{Feature|Warning|Deleting the display or control from within an event handler will crash the game if deleting is not the last line...")
Jump to navigation Jump to search

for User Interface Event Handlers

Deleting the display or control from within an event handler will crash the game if deleting is not the last line in the event handler's script or code.

onButtonClick = "ctrlDelete (_this select 0); systemChat 'You will never see this';"; // Will crash the game

onButtonClick = "systemChat 'Bye bye button!'; ctrlDelete (_this select 0);"; // Works just fine

onButtonClick = "[] spawn { ctrlDelete (_this select 0); systemChat 'Bye bye button!'; };"; // Works just fine as well