It is currently Tue Jan 23, 2018 6:41 pm



Reply to topic  [ 2 posts ] 
AreaTargetTracker 
Author Message

Joined: Fri Nov 13, 2015 9:21 am
Posts: 1
Hi I just bought your awesome Plugins ;) ...I have a few understanding problems with TargetPro, example:

*I attached the AreaTargetTracker Script on my enemies to detect the player, how can I trigger events when the Player enter that area ?
e.g:
Code:
AreaTargetTracker areaTarget;

    void Awake()
    {
        areaTarget= GetComponent<AreaTargetTracker>();
        areaTarget.AddOnNewDetectedDelegate(Test);
    }

    private void Test(TargetTracker source, Target target)
    {
        Debug.Log("PLAYER IS IN RANGE!");
    }


Thanks!


Fri Nov 13, 2015 9:31 am
Profile
Site Admin

Joined: Sun Apr 17, 2011 12:30 pm
Posts: 885
Did you add a targetable component to your player gameobject with collider and put it in the target layer? The target layer can be called anything you want, such as "player". It is the layer you set on the target tracker to filter targetables


Fri Nov 13, 2015 8:45 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.