I'm not sure what the proper syntax is for std::string text in DrawTextPrimitive.Let's say I want to have small text that says "TARGET LOCK" centered over an actor that's locally defined as TargetMO. I assume it's similar to DrawLinePrimitive which works in the same Lua script using something like FrameMan:DrawLinePrimitive(TargetMO.Pos,TargetMO.Pos+Vector(5,0),13);, so I would use FrameMan:DrawTextPrimitive(TargetMO.Pos, std::string text, 1, 1), but this doesn't work if I replace std::string text with "TARGET LOCK" like so: FrameMan:DrawTextPrimitive(TargetMO.Pos, "TARGET LOCK", 1, 1) and I get this error message:

But I don't really know what I'm doing here and there's not much about this or similar things online, or I don't know what to look for.How do I enter the text to draw?

Sat Jan 21, 2017 4:03 am

Bad Boy

Joined: Fri Sep 10, 2010 1:48 amPosts: 660Location: Halifax, Canada

Re: How to use DrawTextPrimitive?

I don't remember what the parameters for this actually do anymore but the error tells you what the problem is - the 3rd parameter should be a boolean instead of a number, so replace the first 1 with true or false.I.e. FrameMan:DrawTextPrimitive(TargetMO.Pos, "TARGET LOCK", true, 1)

Who is online

Users browsing this forum: No registered users

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