Jump to content

HonzaVinCZ

Member
  • Content Count

    60
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About HonzaVinCZ

  • Rank
    Lance Corporal

Profile Information

  • Gender
    Male
  • Location
    CZE

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. HonzaVinCZ

    C0000005 ACCESS_VIOLATION at F88B6A1D

    No, I don't know.
  2. Hello, my mate has some error happening after upgrading his GPU. He can launch Arma with mods without any problems but after 5-10min, his client crashes. He has everything up to date as he says. He also tried to reinstall the game but it didn't help. Log download ( Google Drive ) Also one note worth to say... The .mdmp file has over 46 MB. The mdmp file download ( Google Drive )
  3. HonzaVinCZ

    Need your help with this script

    Yes, that is what I'm looking for. But I'm not sure how to use that properly in my script.
  4. HonzaVinCZ

    Need your help with this script

    So I have solved half of the problem. Now I have problem with mission variable. If I place two objects with same init, the script can't make variable for each object when creating mission ID. Any idea how can I make mission ID variable, please? _ied = _this select 0; _iedPos = getPosATL _ied; _table = nearestObject [_iedPos, "Land_WoodenTable_small_F"]; _iedTrig1 = createTrigger ["EmptyDetector", _iedPos , true]; _iedTrig1 setTriggerArea [10, 10, 10, false, 5]; _iedTrig1 setTriggerActivation ["WEST", "PRESENT", false]; _iedTrig1 setVariable[ "ied", _ied ]; _iedTrig1 setVariable[ "iedPos", _iedPos ]; _iedTrig1 setTriggerStatements [ "this && (thisTrigger getVariable 'ied') mineDetectedBy west && alive (thisTrigger getVariable 'ied')", "[west, ['mission_'], ['Our forces found enemy IED factory, your task is to destroy it.', 'Destroy IED factory'], thisTrigger getVariable 'iedPos', 1, 3, true, 'destroy', true] call BIS_fnc_taskCreate;", ""]; _iedTrig2 = createTrigger ["EmptyDetector", _iedPos , true]; _iedTrig2 setTriggerActivation ["NONE", "PRESENT", false]; _iedTrig2 setVariable[ "ied", _ied ]; _iedTrig2 setVariable[ "iedTrig1", _iedTrig1 ]; _iedTrig2 setTriggerStatements [ "!alive (thisTrigger getVariable 'ied') && triggerActivated (thisTrigger getVariable 'iedTrig1')", "['mission_', 'SUCCEEDED', true] call BIS_fnc_taskSetState;", ""]; waitUntil {triggerActivated _iedTrig2}; deleteVehicle _iedTrig1; deleteVehicle _iedTrig2;
  5. HonzaVinCZ

    Need your help with this script

    Thank you very much, I thought these vaules are undefined in trigger but had no idea how to define them in trigger. So if I want define any values in trigger, I must define them by _trigg setVariable ... ? Also does it work for multiple values? For example if I wanted to store two values, I just write more setVariable ?
  6. Hey guys, today I have problem with this script. I have been working on this thing for like 4 hours now and can't make it work without problems. I have tried many different ways to solve the described problem below but without effect. Basically this script is executed from init field of IED and if player enters proximity of 5 meters around the IED (IED is placed on table), it will create task informing player he found IED factory and it must be destroyed. The problem is, there are no errors popping out when mission is started and task is created well as it should but the task missing place and if the IED is destroyed or disarmed, mission is not succeeded. Btw ignore the _table, I'm working on it. _ied = _this select 0; _iedPos = getPosATL _ied; _table = nearestObject [_iedPos, "Land_WoodenTable_small_F"]; _iedTrig1 = createTrigger ["EmptyDetector", _iedPos , true]; _iedTrig1 setTriggerArea [5, 5, 0, false, 5]; _iedTrig1 setTriggerActivation ["WEST", "PRESENT", false]; _iedTrig1 setTriggerStatements [ "this", "[west, ['iedFactoryTask_'], ['Our forces found enemy IED factory, your task is destroy it.', 'Destroy IED factory'], objNull, 1, 3, true, '', true] call BIS_fnc_taskCreate; ['iedFactoryTask_', _iedPos] call BIS_fnc_taskSetDestination; deleteVehicle thisTrigger;", ""]; _iedTrig2 = createTrigger ["EmptyDetector", _iedPos , true]; _iedTrig2 setTriggerActivation ["NONE", "PRESENT", false]; _iedTrig2 setTriggerStatements [ "!alive _ied", "['iedFactoryTask_', 'SUCCEEDED', true] call BIS_fnc_taskSetState; deleteVehicle thisTrigger;", ""];
  7. HonzaVinCZ

    How can I simplify this script?

    Thank you! I saw scripts like very often used in Exile but there's dynamic weather hard coded to be very often rainy. Also I wanted to try make dynamic weather script on my own, I wanted to learn something new.
  8. HonzaVinCZ

    How can I simplify this script?

    I had no idea that there can be dynamic weather generated by Arma engine itself.
  9. HonzaVinCZ

    How can I simplify this script?

    Oh that... I floored it there just for sure of performance. For example if the calculation results in number like 0,5444444444... . Not sure if it helps somehow. Is the floor useless here? You right, I'm just blind. Will move that under _timeTrue condition. Mistaken it with setTimeMultiplier, didn't read it when I was switching between browser and text editor. Thank you, will take look on it.
  10. HonzaVinCZ

    How can I simplify this script?

    As I said, I'm not very experienced and I'm very amateur in scripting. It suprised myself that this script actually works well but had no idea how could I optimise it. Will use that, thank you. Sorry, I have no idea how this works, never worked with that. Because I was not sure if the value was a bit different due to some lag or something, the "if" condition would then be false. I was working with that it outputs dayTime in HH:MM:SS but just now realised I can put there "HH" condition so I don't need floor condition anymore if I'm right - sometimes I just don't know what I'm doing and just only testing what will work. Didn't even notice that, thank you. There's _weather = true condition for turning the weather on/off. I don't want to disable whole script in init because there are more functions in one script I can enable or disable. It does. If it is true, it will enable using of scripted time. If _time = 10, then the script will skip time to make mission start time 10:00. If it is false, the condition will not be executed so there will be default time set in editor on mission start.
  11. Hello guys, I have done my own weather script but as you can see, I'm not any scripting wizard and I know all these lines must be quite stressful for engine to read but don't know how to simplify the loop to make it more lag free. Basically this script has three main features: Weather, time acceleration and skip to given time. Weather is changed every ingame half hour and it takes another ingame half hour to change. The ingame half hour is calculated from time acceleration. It's the _delayHalfHourFloored variable. The _debug function is WIP. 😄 _weather = true; // Set dynamic weather on/off. Value: true/false. Default: true _timeMultiplier = 1; // Set time acceleration. Value: 0.1-120. Default: 1 _timeTrue = true; // Set scripted mission start time on/off (using skipTime function) _time = 10; // Set mission start time. Value in 24 hours format (1-24). Minutes usage example: 18.24 means 18:24. Default: 10 _debug = true; // Set debug on/off _delay1Hour = 3600 / _timeMultiplier; _delay1HourFloored = floor _delay1Hour; _delayHalfHour = _delay1HourFloored / 2; _delayHalfHourFloored = floor _delayHalfHour; skipTime (_time - daytime + 24 ) % 24; if (_timeTrue) then { setTimeMultiplier _timeMultiplier; }; while {_weather} do { _daytime = floor daytime; _valueOvercast = random [0, 0.3, 1]; if (_daytime == 0) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 1) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 2) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 3) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 4) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 5) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 6) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 7) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 8) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 9) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 10) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 11) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 12) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 13) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 14) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 15) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 16) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 17) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 18) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 19) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 20) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 21) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 22) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; if (_daytime == 23) then { _delayHalfHourFloored setOvercast _valueOvercast; if (_valueOvercast >= 0.5) then { _vauleRain = _valueOvercast; _delayHalfHourFloored setRain _vauleRain; if (_vauleRain <= 0.4) then { _delayHalfHourFloored setFog random [0, 0.2, 0.5]; }; } else { _delayHalfHourFloored setRain 0; }; }; sleep _delayHalfHourFloored; };
  12. HonzaVinCZ

    [Help] Custom Vehicle Markers

    That is just perfect! Thank you a lot! Oh yes, I'm still beginner in scripting so I know about it little. I can create something that works but I have no idea what it could do with performance. Also I'm basically learning C++ in Arma engine and that's also not ideal but I actually don't use C++ anywhere else.
  13. Hey guys, I need you to help me with this script. Basically this script creates markers on selected vehicles and makes markers move with vehicles. Problem with this script is, that it cannot find target vehicle after vehicle was destroyed and respawned by other script I'm attaching under my actual script. It even won't work if vehicle name is set in editor. Any idea how could I make marker find vehicle again, change text to not destroyed and move with that vehicle again please? scripts\VehicleMarkers.sqf scripts\Vehicle.sqf ( Vehicle respawn script )
  14. I was so lucky and I had to laugh what I noticed. In this situation you need to type variable without that "_" and then it will work. I was trying everything and then I tried to remove those "_" in variables containing just number and it worked! So then I could finish this script. Not sure with using "if-then" in this situation to turn on/off civilian or team kill punishment... it was just not working if even "if" was true so I removed that and let script be like this: // Turn Punishments ON/OFF _run = true; // How many points take away to instigator for civillian killed civilianPunishmentPoints = -100; // How many points take away to instigator for teamkill teamKillPunishmentPoints = -100; // Score to kick for is <= kickPoints kickPoints = -500; if ((_run) && (isServer)) then { civilianPunishmentPointsABS = abs civilianPunishmentPoints; teamKillPunishmentPointsABS = abs teamKillPunishmentPoints; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; // UAV/UGV player operated road kill if (isNull _instigator) then { _instigator = UAVControl vehicle _killer select 0 }; // player driven vehicle road kill if (isNull _instigator) then { _instigator = _killer }; // Civillian Punishment if ((side group _killed == civilian) && (isPlayer _instigator)) then { _instigator addScore civilianPunishmentPoints; systemChat format ["%1 killed a civilian, he loses %2 score.", name _instigator, civilianPunishmentPointsABS]; }; // Team Kill Punishment if ((side group _killed == side _instigator) && (isPlayer _instigator)) then { _instigator addScore teamKillPunishmentPoints; systemChat format ["%1 did a team kill, he loses %2 score.", name _instigator, teamKillPunishmentPointsABS]; }; // Kick For Too Bad Points if ((score _instigator <= kickPoints) && (isPlayer _instigator)) then { _uid = getPlayerUID _instigator; systemChat format ["%1 has been kicked for killing too many civillians and/or team kills", name _instigator]; serverCommand format ["#kick %1", _uid]; }; }]; }; Hopefully someone find it helpful!
  15. So... I still didn't found how to make it work. The problem are just number variables. When I set numbers in addScore manually, it works well but it won't work with variables I set. I must have it written wrong so I would like to ask you how I could write those number variables right because I have no idea how to write it.
×