| Archer30   
   
   Posts: 1192
 
 |  | 
	| 20.06.2021 04:28 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 20.06.2021 15:29 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 |  | 
	| 20.06.2021 22:28 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 | 
			| 
 
				
dlg_action and mouse_action differ. CM:S and CM:T
 
dlg_action allows to handle the following events:
 
Code:
 [+] Event DL/(OnCustomDialogEvent) now receive all mouse/keyboard parameters, accessible via !!CM and tracks clicks outside dialogs main area.Check CM:T or i^dlg_action^ value for:
 (DLG_ACTION_INDLG_CLICK)
 (DLG_ACTION_OUTDLG_CLICK)
 (DLG_ACTION_MOUSE_WHEEL)
 (DLG_ACTION_KEY_PRESSED)
 
 Example:
 
 !?DL&i^dlg_action^=(DLG_ACTION_OUTDLG_CLICK);
 !!IF:M^You clicked outside dialog!^;
 
 For (DLG_ACTION_MOUSE_WHEEL) action CM:S or i^mouse_action^ can be one of:
 (MOUSE_WHEEL_UP)
 (MOUSE_WHEEL_DOWN)
 
 Example:
 
 !?DL&i^dlg_action^=(DLG_ACTION_MOUSE_WHEEL);
 !!IF:M^Wheel: %i(mouse_action)^; display 1/-1 for wheel up/down
 
 Keyboard presses in dialog can be handled now using Era Erm Framework:
 
 !?DL&i^dlg_action^=(DLG_ACTION_KEY_PRESSED)/i^key^=(KEY_Q);
 !!IF:M^Good buy any dialog!^;
 !!DLi^dlg_id^:C(TRUE);
 
 Added two global variables to Era Erm Framework:
 - i^dlg_action^ with CM:T value (action type). Specially useful for DL-dialog events. See DLG_ACTION_XXX constants.
 - i^dlg_id^ with active DL-dialog ID.
 
The dialog on screen is a layout in Photoshop. igrik was working on this dialog.
			 
 Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
 Поддержать проект
 
 |  | 
	| 21.06.2021 05:17 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 | 
			| 
 
				Interesting!    Never thought about CM:T, there was almost nothing about it from ERM help
 
____
 
Another question, looks like name variables are not supported for ert  yet? 
 
Code:
 Do you wish to teach %(hero:z) Expert %s(trainer_secSkill)?
 
____
 
Looks like some DL syntax still relies on standard z var heavily
 
If you replace z30 with ^^, it doesn't work   
 Latest ERA mods and scripts in development -  My GitHub
 
				
(This post was last modified: 22.06.2021 01:55 by Archer30.)
 |  | 
	| 21.06.2021 17:57 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 22.06.2021 02:40 |  | 
	
		| helgtla   
   
 Posts: 302
 
 | 
			| 
 
				    Пример: после использования артефакта (размещённого на кукле героя), герой перемещается в определённую локацию. И после этого, для продолжения игры (дальнейшее движение героя по карте приключений), приходится каждый раз нажимать либо мышкой на клавишу "закрыть окно героя", либо нажимать ENTER, либо ESC на клавиатуре.  Сама необходимость использования подобной особенности артефакта - возникает довольно часто (практически каждый ход игрока), а потому необходимость постоянно проделывать вышеописанное - немного раздражает.
 И потому повторно попытаюсь спросить: можно ли как-то скриптами принудительно закрыть уже открытое "окно героя" ?  Через UN:С , или может есть функция за подобное отвечающая (способная сымитировать нажатие клавиши ENTER, либо ESC.)
 
 Карта-мод:  STALKER
 |  | 
	| 22.06.2021 15:06 |  | 
	
		| igrik   
   Posts: 2821
 
 |  | 
	| 22.06.2021 15:45 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 | 
			| 
 
				Berserker, thanks! Then I have to mix name variables and y99 (local var with large index) for my strings    
___
 
New question - Looks like the VR:V command requires the targeted string to contain exactly an integer and nothing else. Is it possible to extract the number from a string even it's not just a number there?   
  num1 = 0, num2 = 11
			 
 Latest ERA mods and scripts in development -  My GitHub
 |  | 
	| 22.06.2021 21:55 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 | 
			| 
 
				Quote:Berserker, thanks! Then I have to mix name variables and y99 (local var with large index) for my strings 
Why?
 
The second question answer is "you need complex function for that". The function should scan characters, checking their codes to be in 48..57 range (''0'..'9') stopping on non-digit and calling !!FU(Substr) to get numeric part of the string to be further converted to integer.
			 
 Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
 Поддержать проект
 
 |  | 
	| 23.06.2021 04:51 |  | 
	
		| igrik   
   Posts: 2821
 
 |  | 
	| 23.06.2021 12:24 |  | 
	
		| helgtla   
   
 Posts: 302
 
 | 
			| 
 
				igrik,  принял. Благодарю за отклик на мою просьбу о помощи в данном вопросе.
			 
 Карта-мод:  STALKER
 |  | 
	| 23.06.2021 12:46 |  | 
	
		| Archer30   
   
   Posts: 1192
 
 | 
			| 
 
				Hi Berserker , just realise I've never read about VR:Z syntax. From the example  it seems a bit...old fashioned?  It can be easily replaced with VR:S
 
________
 
Hi, I'm wondering why do some objects have the same type/subtype, but different def and passability?
 
How do I place the 1 tile rock (type 147, subtype 0) via UN:I?
  
 Latest ERA mods and scripts in development -  My GitHub
 
				
(This post was last modified: 26.06.2021 21:52 by Archer30.)
 |  | 
	| 26.06.2021 21:48 |  | 
	
		| Berserker   
   
   Posts: 16785
 
 |  | 
	| 26.06.2021 22:09 |  |