Forum Jump :

Author Message


Posts: 27
Rank:


Level: Member

Country: za
Location: Cape Town
Occupation:
Age: 23
In-game name: Rabid Squirrel

 
#1 Posted at 2015-07-20 17:21        
     
Hey all,

I am working on a new campaign, and I would like a trigger (event) to go off when a player sees an item or area physically (He will be scanning through a UAV at the time). Specifically speaking when the player spots a weapon on the ground with the UAV he knows the enemy has been through that area and it triggers a new task and some dialog.

Thanks in Advance,
Squirrel.


Author Message


Posts: 3
Rank:


Level: Member

Country: us
Location: Chicago, Illinois
Occupation: School
Age: 22
In-game name: Bismarck

 
#2 Posted at 2015-07-27 01:11        
     
https://community.bistudio.com/wiki/worldToScreen

_return = worldToScreen (getPos weaponOnGroundObject);
if ((count _return) == 0) then {
    //weapon not on screen
} else {
    //weapon is on screen or "spotted"
};
This code will query once to check if the player has the object in question on his screen or not. If you want to check it repeatedly then you can put it in a loop.


Advertisement


Author Message


Posts: 27
Rank:


Level: Member

Country: za
Location: Cape Town
Occupation:
Age: 23
In-game name: Rabid Squirrel

 
#3 Posted at 2015-07-27 05:54        
     
Thanks a Bunch DerBismarck!






Tags: Item, Player, Spot, Uav