View Single Post
  #682  
Old 24-03-2019, 09:45
Schabik Schabik is offline
Registered User
 
Join Date: Dec 2008
Location: Somewhere in Poland
Posts: 152
Thanks: 17
Thanked 35 Times in 32 Posts
Schabik is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
How to use by ID (ID is the number of the component represented by "#" in keys Component#.Name=):
Code:
  if IsComponentSelectedByID(3) then
    MsgBox('True', mbInformation, MB_OK)
  else
    MsgBox('False', mbInformation, MB_OK);
How to use by Name (Same name that you used in INI):
- If you have "" in the name you will check with dependence on "Level".
- If you do not have "" in the name you will only check on the components with "Component # .File" other than empty.
Code:
  if IsComponentSelectedByName('Game Components\') then 
    MsgBox('True', mbInformation, MB_OK)
  else
    MsgBox('False', mbInformation, MB_OK);
Code:
  if IsComponentSelectedByName('Game Components\Custom Name') then
    MsgBox('True', mbInformation, MB_OK)
  else
    MsgBox('False', mbInformation, MB_OK);
Code:
  if IsComponentSelectedByName('Game Components\cm:FR') then
    MsgBox('True', mbInformation, MB_OK)
  else
    MsgBox('False', mbInformation, MB_OK);
Do I need to add some decelerations to the code for IsComponentSelectedByID or IsComponentSelectedByName functions?
Reply With Quote