Arma 3

Arma 3

檢視統計資料:
wynans13 2019 年 11 月 20 日 下午 12:52
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???
< >
目前顯示第 1-9 則留言,共 9
wynans13 2019 年 11 月 20 日 下午 1:02 
引用自 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 2019 年 11 月 20 日 下午 1:04 
Second.variable "hacked2"=true, just write it below the first variable? Like this:

hacked=true
hacked2=true

Lettuce (formerly G4rrus) 2019 年 11 月 20 日 下午 2:35 
btw, if you happen to use ace I'd recommend making it an ace action.
wynans13 2019 年 11 月 20 日 下午 2:48 
引用自 Drgn V4karian
btw, if you happen to use ace I'd recommend making it an ace action.
How do I do that?
wynans13 2019 年 11 月 22 日 上午 11:00 
copy that. I wil try that. thanks man. And this is mp compatible?

引用自 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 2019 年 11 月 23 日 下午 12:31 
引用自 Spidy
引用自 wynans13
And this is mp compatible?
Yes

Thanks man. I'll try that
wynans13 2019 年 11 月 24 日 下午 4:55 
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 2019 年 11 月 27 日 下午 1:18 
引用自 Spidy
compare your stuff with that one already described....
I did, I just copy and pasted it
wynans13 2019 年 11 月 28 日 下午 3:34 
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
*/

最後修改者:wynans13; 2019 年 11 月 28 日 下午 4:32
< >
目前顯示第 1-9 則留言,共 9
每頁顯示: 1530 50

張貼日期: 2019 年 11 月 20 日 下午 12:52
回覆: 9