CreativeProduct
Member-
Content Count
26 -
Joined
-
Last visited
-
Medals
Community Reputation
2 NeutralAbout CreativeProduct
-
Rank
Private First Class
Profile Information
-
Gender
Male
-
Location
Frankfurt, Germany
-
Interests
Sharing is caring! ;)
Recent Profile Visitors
-
Chances in an array
CreativeProduct replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I would have never thought about reading the wiki! Thanks a lot! Cheers. -
Chances in an array
CreativeProduct replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Now, since i got it working so far, im wondering how that "weightet" system works. If we have for an example a value of 35 and a second value of lets say 1, how would the Chance be calculated? Would the 1% be 1/36? Thanks for helping me out, got a thanks from me! ~CP -
Chances in an array
CreativeProduct replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh my. Theres the command sort solving all my problems. /sigh. -
-
Hello there! I've been working the entire day and just came up with a new idea about an hour ago. I'm having problems reight now in gettin the "correct" item. My Goal is the following: I have stetup an array, which contains weapons, Alternative version of weapons and ultimatively the chance by using this: ["SomeWeapon",["WeaponSKin1","Weaponskin2"],70] Now, the problem is the following, im creating a random number the "general" chance. If the Chance of the weapon is lower, it gets added to an array. Creating a big array with all the weapons with a >70% spawnrate. Now I want to select only the weapon with the highest chance and cant seem to get it. I feel like im pretty close but can't figure it out right now (should take a break sometime soon ;) ). Anyway, thats what I have gotten so far: _chance = 100; _array = []; _selectedWeapon = ""; _pistol = [["hgun_ACPC2_snds_F",["hgun_ACPC2_snds_F"],70],["hgun_Pistol_heavy_01_F",[""],5],["arifle_MXC_Black_F",["arifle_MX_khk_F","arifle_MX_F"],35]]; _weapon = _pistol call BIS_fnc_SelectRandom select 0; { if (_chance <= _x select 2) then {_chance = _x select 2; _array = _array + [[_x select 0,_x select 1]]; _selectedWeapon = _array select ((count _array) - 1);}; sleep 1; hint format ["%1\n%2",_array, _selectedWeapon]; } foreach _pistol; Getting the alternate versions isnt big of the porblem, im currently just stuck with selecting the weapon with the highest chance blew the "general chance". Thanks in Advance, CP~
-
Help required for Dialogs.
CreativeProduct replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Alright, I got it working. Had a long break from scripting and well, the result speak for themselves. Thank you for your help! -
Help required for Dialogs.
CreativeProduct replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
class IslandDialog { idd = -1; c lass TER_RscDisplayTargetDebug { idd = 73042; fadeIn = 0; fadeOut = 0; duration = 1e+6; onLoad = "uiNamespace setVariable [""TER_3den_RscTargetDebug_display"",_this select 0]"; class Controls { class Box { type = 0; idc = 1000; x = safeZoneX + safeZoneW * 0.908125; y = safeZoneY + safeZoneH * 0.83333334; w = safeZoneW * 0.115; h = safeZoneH * 0.20777778; style = 0; text = ""; colorBackground[] = {0.2,0.2,0.2,0.7858}; colorText[] = {0.5608,0.3059,0.6549,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); }; }; Somewhat like that? -
Hello there, I am having problems figuring this out, its probably just some dull misake by myself, but the lack of knowledge lead me to create this topic. I have used the ArmA Dialog Creator to create a dialog, so far soo good. Everything works like a charm when using CreateDialog. However, I need to call it with CutRsc (if I remember correctly) to make the displa appear but still be able to moeve and use the mouse. This is the main dialog, if "Customcontrolclasses.h" are just below. #include "CustomControlClasses.h" class IslandDialog { idd = -1; duration = 9999999; onLoad = "uiNamespace setVariable ['HUD', _this select 0];"; class Controls { class Box { type = 0; idc = 1000; x = safeZoneX + safeZoneW * 0.908125; y = safeZoneY + safeZoneH * 0.83333334; w = safeZoneW * 0.115; h = safeZoneH * 0.20777778; style = 0; text = ""; colorBackground[] = {0.2,0.2,0.2,0.7858}; colorText[] = {0.5608,0.3059,0.6549,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); }; class HUNGER { type = 0; idc = 1001; x = safeZoneX + safeZoneW * 0.911875; y = safeZoneY + safeZoneH * 0.87; w = safeZoneW * 0.0375; h = safeZoneH * 0.03666667; style = 0; text = "HUNGER"; colorBackground[] = {0,0,0,0}; colorText[] = {0.7098,0.7059,0.1882,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); }; class ThirstCtrl { type = 0; idc = 1002; x = safeZoneX + safeZoneW * 0.911875; y = safeZoneY + safeZoneH * 0.91; w = safeZoneW * 0.0375; h = safeZoneH * 0.03666667; style = 0; text = "THIRST"; colorBackground[] = {0,0,0,0}; colorText[] = {0.7098,0.7059,0.1882,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); }; class HealthCtrl { type = 0; idc = 1003; x = safeZoneX + safeZoneW * 0.911875; y = safeZoneY + safeZoneH * 0.95; w = safeZoneW * 0.0375; h = safeZoneH * 0.03666667; style = 0; text = "HEALTH"; colorBackground[] = {0,0,0,0}; colorText[] = {0.7098,0.7059,0.1882,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); }; class FPSCtrl { type = 0; idc = 1005; x = safeZoneX + safeZoneW * 0.911875; y = safeZoneY + safeZoneH * 0.83; w = safeZoneW * 0.0375; h = safeZoneH * 0.03666667; style = 0; text = "FPS"; colorBackground[] = {0,0,0,0}; colorText[] = {0.7098,0.7059,0.1882,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); }; }; }; CustomControlClasses.h: #ifndef HG_CustomControlClassesh #define HG_CustomControlClassesh 1 //Create a header guard to prevent duplicate include. class RscListBox_WS { type = 5; style = 0; idc = -1; colorSelect[] = {0,0.2,0.4,1}; colorSelectBackground[] = {0,0.2,0.4,0.1}; colorText[] = {0.2,0.2,0.2,1}; colorBackground[] = {0.4,0.4,0.4,0}; font = "Bitstream"; sizeEx = 0.04; rowHeight = 0.025; maxHistoryDelay = ""; }; class RscPictureKeepAspect_WS { type = 0; style = 48+2048; idc = -1; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; font = "Bitstream"; sizeEx = 0; lineSpacing = 0; text = ""; }; class RscText_WS { type = 0; style = 0; idc = -1; colorBackground[] = {0,0,0,0}; colorText[] = {0.2,0.2,0.2,1}; font = "Bitstream"; sizeEx = 0.03; text = ""; }; class RscControlsGroup_WS { type = 15; style = 0; idc = -1; maxHistoryDelay = ""; }; class RscButton_WS { type = 1; style = 2; idc = -1; font = "Bitstream"; sizeEx = 0.03; default = false; colorText[] = {0,0,0,1}; colorDisabled[] = {0.4,0.4,0.4,1}; colorBackground[] = {1,1,1,1}; colorBackgroundDisabled[] = {0.7,0.7,0.7,0.8}; colorBackgroundActive[] = {1,0.5,0,1}; colorFocused[] = {1,0.5,0,1}; colorShadow[] = {0.72,0.36,0,0.8}; colorBorder[] = {0.72,0.36,0,0}; soundEnter[] = {"",0.1,1.0}; soundPush[] = {"",0.1,1.0}; soundClick[] = {"",0.1,1.0}; soundEscape[] = {"",0.1,1.0}; offsetX = 0.0030; offsetY = 0.0030; offsetPressedX = 0.0020; offsetPressedY = 0.0020; borderSize = 0.0; }; class RscTextMulti_WS : RscText_WS { lineSpacing = 1; style = 0+16+512; }; #endif My goal is to have the display up at any time. Thanks in advance, CP.
-
Make AI reveal all units
CreativeProduct replied to ZU23's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh, even a lot simpler than I thought. Interesting. Keep it up! Cheers, CP~ -
Make AI reveal all units
CreativeProduct replied to ZU23's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If you have a set number of units, I THINK (s not tested yet, duh.) you could do the following: P.S.: It's late, so there could be some errors. Cheers, CP~ _MaxUnits = count Allunits; While {true} do { _Count = 0; if (_count < _MaxUnits) then { { _count = _count + 1; _x reveal [(allUnits select _count),1]; } forEach allUnits; }; Sleep 20; //To prevent explosions }; -
Make AI reveal all units
CreativeProduct replied to ZU23's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey ZU23! Basically what you are doing is revealing them from therselves since _x is the same, until it hops onto the next unit. _X is triggered for allUnits. So lets take _Unit0 as an example for this. You are revealin _unit0 to _unit0. ( _Unit0 reveal [_unit0,1]; You need tochange the second _x value to prevent that from happening. Cheers, CP~ -
Needing help with setting an objects position
CreativeProduct replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Alright, I found a solution to my problem. It Seems as the Command GetPos got a new way to use it with a second parameter being the direction. I solved my problem by doing this: By Preseting _dir to 0. if ( (_x distance (GetMarkerPos "Zone")) > _Size) then { _dir = _dir + 3; _pos = (Getmarkerpos "Zone") Getpos [(_SizeMarker - _Speed), _dir]; _x setpos _pos; }; Thanks for the help, I really Appreciate it! Love, CP~ -
Needing help with setting an objects position
CreativeProduct replied to CreativeProduct's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey there! Thanks for the code, but im afraid it' not what I am looking for, but it looks pretty interesting. So, let me try to clear some things up. Hopefully, duh. I have created a marker, that marker decreases in Size (only in size, Center stay in the same place) after a while (similar to a Zone restriction). Since I cant attach those cones to the edge of the marker I need to move them Manually. SO I set them facing into the center and then doing my ModelToWorld magic trick. However, as seen in the pic, the positions are getting messed up. Either the cones arent the exact same distance to the center, or something "interrupts" the movement. Thanks again for your suggestion, CP~ -
Needing help with setting an objects position
CreativeProduct posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello there! I was trying to Visualize a Marker by having objects placed at the edge of that specific marker. Using SHK_Pos its done in no time at all. Now, the problem is, that the Markers Size reduces over time and the created objects (in my case Cones) should continue to be at the edge of the marker while the marker is shrinking. The "shrinking" paprt works, but not perfectly, as the cones end up in random places at the end (Screenshot) Im not quite sure what happening, so those are my Assumptions: Objects cant be spawned outside of the world (Eg. Black area outside of the chart) SHK_Pos Is not getting the correct position My Way of setting the position of the cones isnt accurate The cones get stuck on other objects liek buildings, messing up the positions. Me, not seeing the most obvious thing This is the Code im using. _Size is the Distance. - _DummyList is the Array of the Cones created - _Speed is 5. If (_SizeMarker > _Size) then { "Zone" setMarkerColor "ColorRed"; "Zone" SetmarkerSize [(_SizeMarker - _speed),(_SizeMarker - _speed)]; { if ( (_x distance (GetMarkerPos "Zone")) > _Size) then { _x setpos [(_x modelToWorld [0,_speed,0]) select 0, (_x modelToWorld [0,_speed,0]) select 1, 0]; }; } Foreach _DummyList; [_size, _DummyList] Execvm "Server\Zones\zoneScaling.sqf"; Sleep 0.1; } else {"Zone" setMarkerColor "ColorBlue";}; I was trying the script in 50 Meters distance in which everything worked fine. The Script need to be run individually since the _Size Changes by a different script. Thanks in Advance, CP ~ -
In the need of help for my music addon
CreativeProduct posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hey there, CP here. I started creating my own mod which includes music for my mission. However, it looks like i set everything up correctly, but well, the RPT shows me, that the music is not found. ("Music music0 not found") Path of my Soundfile is "@console\Ambient.pbo\music\Soundtrack_0.ogg" CfgMusic in config.cpp class CfgMusic { // List of tracks (.ogg files without the .ogg extension) tracks[] = {"music0"}; class music0 { name = "music0"; // Name for mission editor sound[] = {"\Ambient\music\Soundtrack_0.ogg", db + 0, 1.0}; }; }; I am using the command "Playmusic "music0";" CfgPatches is also included. As far as I know, I dont need to include the cfgMusic in the description.ext, but I could be wrong here. -
EDIT: Just found out that there's a config and mod section, that was my bad and I'm sorry for posting it in the wrong section.