View unanswered posts | View active topics It is currently Thu Dec 26, 2024 5:05 am



Reply to topic  [ 5 posts ] 
 Using AddObjectivePoint on an actor (SOLVED) 
Author Message
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post Using AddObjectivePoint on an actor (SOLVED)
So we've all seen those flashing objective arrows in missions - I've tracked down their creation to AddObjectivePoint with a few variables. I want to attach that to an actor that you can just hire whenever, rather than in specific activities. When I try it gives me "attempt to call method 'AddObjectivePoint' (a nil value)' - is that a thing that can be done?


Last edited by Djinn on Mon Aug 20, 2012 7:34 pm, edited 1 time in total.



Mon Aug 20, 2012 3:22 am
Profile YIM

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post Re: Using AddObjectivePoint on an actor
Here you go, this'll work for anything in activity (I think).
Code:
local act = ActivityMan:GetActivity()
ToGameActivity(act):AddObjectivePoint("text", Position, Team, GameActivity.ARROWDOWN);

This can also be streamlined to one line as follows:
Code:
ToGameActivity(ActivityMan:GetActivity()):AddObjectivePoint("text", Position, Team, GameActivity.ARROWDOWN);

ARROWDOWN can also be ARROWUP and maybe a few others, sadly all the activity stuff is woefully documented.


Last edited by Bad Boy on Thu Jan 23, 2014 7:16 am, edited 2 times in total.



Mon Aug 20, 2012 3:49 am
Profile
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post Re: Using AddObjectivePoint on an actor
Works perfectly, thank you my man.


Mon Aug 20, 2012 7:34 pm
Profile YIM
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post Re: Using AddObjectivePoint on an actor (SOLVED)
Okay, it works perfectly except that I just noticed once you kill the target that caused it to appear, the message does not disappear. How do you clear that message afterwards?


Fri Sep 14, 2012 4:12 am
Profile YIM

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post Re: Using AddObjectivePoint on an actor (SOLVED)
ToGameActivity(ActivityMan:GetActivity()):ClearObjectivePoints()
I think there might be a team argument in there though I don't remember at the moment. It works fine without one though.


Fri Sep 14, 2012 4:49 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.072s | 15 Queries | GZIP : Off ]