Data Realms Fan Forums http://45.55.195.193/ |
|
Using AddObjectivePoint on an actor (SOLVED) http://45.55.195.193/viewtopic.php?f=73&t=31603 |
Page 1 of 1 |
Author: | Djinn [ Mon Aug 20, 2012 3:22 am ] |
Post subject: | 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? |
Author: | Bad Boy [ Mon Aug 20, 2012 3:49 am ] |
Post subject: | 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. |
Author: | Djinn [ Mon Aug 20, 2012 7:34 pm ] |
Post subject: | Re: Using AddObjectivePoint on an actor |
Works perfectly, thank you my man. |
Author: | Djinn [ Fri Sep 14, 2012 4:12 am ] |
Post subject: | 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? |
Author: | Bad Boy [ Fri Sep 14, 2012 4:49 am ] |
Post subject: | 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. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |