Arma 3
wynans13 Nov 20, 2019 @ 12:52pm
Laptop hacking
Hi guys. Need help.

I want to create a mission where you need to hack a laptop. So I make as followes:
1. Place laptop
2. Place trigger, activation: blufor,activation type: present, on activation:
p1 addaction ["hack", "hacking.sqf"; //p1 is variablename of the player
3. Create "hacking.sqf", content:
_curProgress=0;
hacked=false;
p1 removeAction 0;

while {alive p1 && curProgress <100} do {_curProgress = _curProgress +5;
hintSilent format ["Hacking: %1", _curProgress];

if (_curProgress >=100) then {
hacked=true;
curProgress = 100;
hint "Hacking complete";
};
sleep 1;
};

4. Place create task modul
5. Place task status modul
6. Place scenario end modul
7. Place second trigger
Condition: hacked
8. Sync second trigger with task state modul and scenario end modul.

So this works fine. Now I want to hack two laptops. Problem is that when i hack the first one, the scenario end modul gets adtivates because the first laptop is hacked. How can I set it that the scenario end modul only geta activated when i hack the second laptop???
< >
Showing 1-9 of 9 comments
wynans13 Nov 20, 2019 @ 1:02pm 
Originally posted by Spidy:
8. Sync second trigger with task state modul and scenario end modul.

there you have it..sync it correctly or create a second variable: hacked2 = true;
by the way, i doubt this is mp compatible

Why shouldn't it work in mp?
How do you mean correctly sync it?
wynans13 Nov 20, 2019 @ 1:04pm 
Second.variable "hacked2"=true, just write it below the first variable? Like this:

hacked=true
hacked2=true

btw, if you happen to use ace I'd recommend making it an ace action.
wynans13 Nov 20, 2019 @ 2:48pm 
Originally posted by Drgn V4karian:
btw, if you happen to use ace I'd recommend making it an ace action.
How do I do that?
wynans13 Nov 22, 2019 @ 11:00am 
copy that. I wil try that. thanks man. And this is mp compatible?

Originally posted by Spidy:
Ok, lets start...
Solution One (advanced)

  • Place your playable entity (Player)
  • Place your laptop (name it eg: laptop1)
  • Write into init of the Laptop (named laptop 1)
    handle = [] execVM "hackLaptop.sqf";

  • Create a sqf file by opening your Windows text editor and name and safe it as: hackLaptop.sqf
    (NOTE: hackLaptop.sqf NOT hackLaptop.sqf.txt!!)

  • Copy and paste code into your hackLaptop.sqf


    /* Name your editor object (here Laptop1) Write into init of object: handle = [] execVM "hackLaptop.sqf"; --Additional Display Icons-- \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_forceRespawn_ca.paa \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_revive_ca.paa \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_takeOff1_ca.paa \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_takeOff2_ca.paa \a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa https://community.bistudio.com/wiki/BIS_fnc_holdActionAdd */ null = [ Laptop1, "Hack Laptop", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "(_this distance _target) < 5 && alive _target", "true", {}, {}, { _complMessage = selectRandom [ "Laptop hacked", "Done!" ]; null = ["User", _complMessage] call BIS_fnc_showSubtitle; hacked = true; publicVariable "hacked"; }, { _intrMessage = selectRandom [ "No WLan-Cable", "Wrong side of USB Stick", "Damn, coffee on keybord", "*Mumbles* ♥♥♥♥ ♥♥♥♥ ♥♥♥♥..." ]; null = ["User", _intrMessage] call BIS_fnc_showSubtitle; }, [], 10, 0, true, false ] remoteExec ["bis_fnc_holdActionAdd", [0,-2] select isDedicated, Laptop1];

  • Place Trigger1 (Task achieved)
    Activation:
    GameLogic
    Condition:
    hacked
    OnActivation:
    Task1 setTaskState "Succeeded"; ["TaskSucceeded",["","Laptop hacked"]] call BIS_fnc_showNotification;
    TriggerTimer - Timer Type - Countdown -
    Min:3 Mid:3 Max:3

  • Place Trigger2 (EndTrigger)
    Activation:
    GameLogic
    Condition:
    hacked
    OnActivation:
    "End1" call BIS_fnc_endMissionServer;
    TriggerTimer - Timer Type - Countdown -
    Min:5 Mid:5 Max:5

Solution Two (easy)
  • Place your playable entity (Player)
  • Place your laptop (name it eg: laptop2)
  • Write into init of the Laptop (named laptop 2)
    laptop2 addAction ["<t color='#FFCC00'>Hack Laptop</t>", {hack = true; publicVariable "hack"; deleteVehicle laptop2}, [], 7, true, true, "", "player distance laptop2 < 3"];

  • Place Trigger1 (Task achieved)
    Activation:
    GameLogic
    Condition:
    hack
    OnActivation:
    Task1 setTaskState "Succeeded"; ["TaskSucceeded",["","Laptop hacked"]] call BIS_fnc_showNotification;
    TriggerTimer - Timer Type - Countdown -
    Min:3 Mid:3 Max:3
wynans13 Nov 23, 2019 @ 12:31pm 
Originally posted by Spidy:
Originally posted by wynans13:
And this is mp compatible?
Yes

Thanks man. I'll try that
wynans13 Nov 24, 2019 @ 4:55pm 
i get an error message at solution1:
with starting the ending screen i get as followes:

call {Task1 *setTaskState "Succeeded"; [TaskSucceede...
Error, Error in expression

any idea?
wynans13 Nov 27, 2019 @ 1:18pm 
Originally posted by Spidy:
compare your stuff with that one already described....
I did, I just copy and pasted it
wynans13 Nov 28, 2019 @ 3:34pm 
muss ich das folgend eauch reinkopieren in die sqf datei? habe bei der zeile mit null angefangen:

/*
Name your editor object (here Laptop1)
Write into init of object: handle = [] execVM "hackLaptop.sqf";

--Additional Display Icons--
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_forceRespawn_ca.paa
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_revive_ca.paa
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_takeOff1_ca.paa
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_takeOff2_ca.paa
\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa

https://community.bistudio.com/wiki/BIS_fnc_holdActionAdd
*/

Last edited by wynans13; Nov 28, 2019 @ 4:32pm
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Nov 20, 2019 @ 12:52pm
Posts: 9