Forum Jump :

Author Message


Posts: 7
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: 575scott@live.com

 
#1 Posted at 2014-07-31 20:25        
     
Hi guys, I'm currently working on a mission where you infiltrate an area, go up to 3 different objects (which are the interactive intel objects that have the "Take intel" action in them) and then proceed to an area to be picked up by a helicopter, but I don't want the waypoint to get to the helicopter to appear until after all 3 intel items have been taken. I'm thinking there's a way to do this with modules but I'm not entirely sure, does anyone have a good idea on how I could do this?


Author Message


Posts: 176
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2014-07-31 20:39        
     
in waypoint you can set condition. or you can sync waypoint with trigger and set condition for trigger.

Try to count collected evidences, for exaple in init.sqf set:

if (isNil "colectedEv") then {colectedEv = 0;};

then in script that you have runing with addaction add:

colectedEv = colectedEv +1; publicVariable "colectedEv";

and in waypoint/trigger condition:

colectedEv == 3


Advertisement


Author Message


Posts: 7
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: 575scott@live.com

 
#3 Posted at 2014-08-01 05:58        
     
The problem is though, I'm using the interactive intel. There's no addaction script in use for the mission currently.


Author Message


Posts: 176
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2014-08-01 08:13        
     
I never use interactive intel so maby someone else could help. If im not wrong, interactive intel object add only diary record. You can write function that check if player have all 3 items in inventory or something. But im think doing this with addaction is simpler, and you can use it on any object you want, not only interactive intel.

addaction should look like this:

_intel = _this select 0;
deleteVehicle _intel;
colectedEv = colectedEv +1; publicVariable "colectedEv";


Author Message


Posts: 7
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: 575scott@live.com

 
#5 Posted at 2014-08-04 20:06        
     
Alright, got rid of the interactive stuff and moved straight to addaction. Right now I have documents sitting on a table with this script in it's init:
this enableSimulation false; myaction = intel_1 addAction ["Take Intel", "intel1.sqfl"]

And my intel1.sqf:

_intel = _this select 0;
deleteVehicle _intel;
colectedEv = colectedEv +1; publicVariable "colectedEv";
player createDiaryRecord ["Intel", "Intel collected.<br /><img image="inte.jpg" />"]

Basically I want it to create a diary record with an image but still be in the .sqf so it can set off triggers. Is that doable?


Author Message


Posts: 176
Rank:


Level: Member

Country: pl
Location:
Occupation:
Age:
In-game name:

 
#6 Posted at 2014-08-05 08:15        
     
check image path. it should work without problem.

EDIT:
Use [.paa] not [.jpg] picture format