Fusion_Marduc
Member-
Content Count
17 -
Joined
-
Last visited
-
Medals
Everything posted by Fusion_Marduc
-
Single mission restart
Fusion_Marduc replied to Fusion_Marduc's topic in ARMA 2 & OA - USER MISSIONS
Hi, the issue is solved. It seemed that not everthing initializes quickly enough after pressing restart. The dialog return value was true but it didn't show. I placed a 'sleep 1;' before the creation of the dialog and now it works.\ Case closed. -
Hi, I created a mission in which the init.sqs calls init_gametype.sqf. In this script a dialog is shown in which a gametype can be selected. From there on all other stuff runs. Everything works fine except for one thing I have no clue about. When the player dies the standard dialog with RESTART/SUSPEND pops up. My issue is about the restart. Is the init.sqs executed again after restart? It seems not because the dialog from init_gametype.sqf is not shown. Any ideas how to handle RESTART correctly. Thanks, Marduc
-
Hi, I made an PAA image file using the Photoshop plugin. The photoshop image has a transparent background but the image (after saving as PAA) is displayed with a white background on my dialog in ARMA2. Any suggestions? Grtz Marduc.
-
Some questions about Singleplayer Mission End
Fusion_Marduc posted a topic in ARMA 2 & OA : ADDONS - Configs & Scripting
Hi there, I have a singleplayer mission that ends (automatically by Arma) when the player dies. When the player dies I still want to be in control of the game, scriptwise i mean. When the player dies i want to display a result dialog. I tried adding a Killed EH for the player but that doesn't seem to work. Also tried a dirty solution by starting a synch script using execVM in which i put "waitUntil {!alive player};" and after that some code. The standard Arma dialog with retry etc pops up and I don't want that. Also respawn = instant doesn't seem to work for single missions. Anyone? :) -
Dialog (Moving)
Fusion_Marduc replied to N939's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Got it working so I wanted to share that in this thread. Some code snippets. In the dialog definition: class HUD { idd = 700; movingEnable = false; movingEnabled = false; duration = 10000; onLoad = "uiNamespace setVariable ['dlgHud',_this select 0]"; controlsBackground[] = {}; controls[] = { "ScoreField", "Indicator01", "Indicator02", etc.... Initiating the dialog and interacting with it: disableSerialization; cutRsc ["HUD","plain"]; ((uiNamespace getVariable 'dlgHud') displayCtrl 711) ctrlSetBackgroundColor noDammageColor; ((uiNamespace getVariable 'dlgHud') displayCtrl 701) ctrlSetText format["%1",pointsScored]; -
Hi, I made an overlay in a map using cutRsc. This works good but at some point I want to get rid of it so the question is. How to close an overlay initiated by cutRsc. Grtz, Marduc
-
Closing a cutRsc overlay
Fusion_Marduc replied to Fusion_Marduc's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
Solved this issue. It can be done using "layer cutFadeOut delay". Grtz. Marduc -
Hi there, I was wondering if it is possible to call a webService from a script, function or dialog. Grtz Marduc.
-
PAA Transparency
Fusion_Marduc replied to Fusion_Marduc's topic in ARMA 2 & OA : TERRAIN - (Visitor)
Thanks all. Special thanks to Bushlurker, that did the trick m8. Case closed. -
PAA Transparency
Fusion_Marduc replied to Fusion_Marduc's topic in ARMA 2 & OA : TERRAIN - (Visitor)
Okay. I never used TextView2 before. How do I make the white background transparent in TextView2. Just saving the image with TextView2 doesn't do it. -
PAA Transparency
Fusion_Marduc replied to Fusion_Marduc's topic in ARMA 2 & OA : TERRAIN - (Visitor)
In textview2 my image also has a white background. I tried to save the psd as tga/gif and tried to open these in textview2. tga -> error loading file gif -> error loading file What am I doing wrong? -
Adding EventHandler after bis_fnc_spawnvehicle
Fusion_Marduc posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi, I'm spawning a BMP3 with crew using BIS function 'bis_fnc_spawnvehicle'. The code looks like this. _spawnLocation = [armorCreationDistance] call fcSetSpawnLocation; _armorArray = [_spawnLocation,1,"BMP3",east] call bis_fnc_spawnvehicle; (_armorArray select 0) addEventHandler ["Dammaged",{(_armorArray select 0) execVM "armor_dammaged.sqf"}]; _crew = _armorArray select 1; { _x execVM "init_unit.sqf"; } forEach _crew; Everything works except for the EventHandler I want to add to the created vehicle (which according to biki is the first value in the return array). The "init_unit.sqf" adds eventhandlers for the crew and that works. Any ideas. Greetz Marduc. -
Adding EventHandler after bis_fnc_spawnvehicle
Fusion_Marduc replied to Fusion_Marduc's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Ok, I tried the advise. Script part that creates the armor with crew _spawnLocation = [armorCreationDistance, getpos player] call fcSetSpawnLocation; _armorArray = [_spawnLocation,1,"BMP3",east] call bis_fnc_spawnvehicle; (_armorArray select 0) execVM "init_armor.sqf"; _crew = _armorArray select 1; { _x execVM "init_unit.sqf"; } forEach _crew; sleep armorCreationDelay; The init_armor.sqf holds: private ["_EhIdx"]; _EhIdx = _this addEventHandler ["Dammaged",{_this execVM "armor_dammaged.sqf"}]; //--------------------------------------------------------------------------------- E O D -- hint format["Init %1 (Eh %2)",_this,_EhIdx]; The hint command shows : Init 0 1-1-A:3 (Eh 0) The armor_dammaged.sqf hint "Armor Dammaged"; This hint doesn't show up. Any more ideas. Eh index 0 should be correct because its the first Eh for the object. Grtz Marduc. -
Adding EventHandler after bis_fnc_spawnvehicle
Fusion_Marduc replied to Fusion_Marduc's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I don't need _armorArray when the Eh runs. I just want to link the Dammaged-Eh to the created BMP3. It works for the BMP3 crew. In script "init_unit.sqf" I link a Killed-Eh to a crew member. -
Dialog (Moving)
Fusion_Marduc replied to N939's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thx Deadfast, Big step forward. But keep getting the 'does not support serialization' error. I use a separate sqf for instantiating the dialog with cutRsc. Tried to set disableSerialization at the beginning but no succes. I can use the global var set in the dialog def - onLoad = "dlgVar = (_this select 0);"; (dlgVar displayCtrl 701) ctrlSetText "test"; is working too. How to get rid of the error message? -
Dialog (Moving)
Fusion_Marduc replied to N939's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks for this answer. Works fine so far. The only downside seems to be that control values can't be set like this. I used 'cutRsc' to instantiate my dialog object. ctrlSetText[<idc>,'Text']; doesn't seem to work. Is this true or is there another way of achieving this. -
Dialog (Moving)
Fusion_Marduc replied to N939's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi, I'm also looking for an answer to this question. On biki I read "Dialogs are parent containers for the actual controls it contains. Their definition contains several properties on the controls it contains, how the dialog can be addressed, and whether or not the player is able to continue regular movement while the dialog is shown.". Well, I want to gain that the player is able to continue moving while the dialog is show but I can't find how to do it. Does anyone know what property to set. Regards, Fusion_Marduc