Jump to content
Default Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Default Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
  • 0
Sign in to follow this  
Poptart

Draw Function

Question

Having a Rough time here getting this to work

 

var BoostPickup = Memory.ReadInt32(processHandle, (IntPtr)0x0088);
            

            if (Components.VisualsComponent.DrawTheVisuals.Enabled)
            {
                Renderer.DrawText(What goes in here? Besides BoostPickup)
            }

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 1

Well, to draw anything at the world you need to use W2S ( World to screen ) which needs matrix to be found and it will out 2d vector after taking the 3d vector in the game for you. And if this is Unreal Engine then there is another W2S you can you can use but needs other inputs than 3d vector which are ( location, View, Fov ) of the local player camera and gives you 2d vector to pass to the draw function so you get it drawn. 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0

You can learn all the possible drawings from this example: https://github.com/WeScript/WeScript.Assemblies/tree/master/ApiExample

 

	static void DrawText(System::String^ text, float x, float y);
	static void DrawText(System::String^ text, float x, float y, Color color);
	static void DrawText(System::String^ text, float x, float y, Color color, int size);
	static void DrawText(System::String^ text, float x, float y, Color color, int size, TextAlignment alignment);
	static void DrawText(System::String^ text, float x, float y, Color color, int size, TextAlignment alignment, bool bordered);
	static void DrawText(System::String^ text, Vector2 position);
	static void DrawText(System::String^ text, Vector2 position, Color color);
	static void DrawText(System::String^ text, Vector2 position, Color color, int size);
	static void DrawText(System::String^ text, Vector2 position, Color color, int size, TextAlignment alignment);
	static void DrawText(System::String^ text, Vector2 position, Color color, int size, TextAlignment alignment, bool bordered);

These are all the possible variants to draw "text"

 

Let me know if you have any more questions.


giphy.gif

Gaben strategies too OP.

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, Feretorix said:

You can learn all the possible drawings from this example: https://github.com/WeScript/WeScript.Assemblies/tree/master/ApiExample

 


	static void DrawText(System::String^ text, float x, float y);
	static void DrawText(System::String^ text, float x, float y, Color color);
	static void DrawText(System::String^ text, float x, float y, Color color, int size);
	static void DrawText(System::String^ text, float x, float y, Color color, int size, TextAlignment alignment);
	static void DrawText(System::String^ text, float x, float y, Color color, int size, TextAlignment alignment, bool bordered);
	static void DrawText(System::String^ text, Vector2 position);
	static void DrawText(System::String^ text, Vector2 position, Color color);
	static void DrawText(System::String^ text, Vector2 position, Color color, int size);
	static void DrawText(System::String^ text, Vector2 position, Color color, int size, TextAlignment alignment);
	static void DrawText(System::String^ text, Vector2 position, Color color, int size, TextAlignment alignment, bool bordered);

These are all the possible variants to draw "text"

 

Let me know if you have any more questions.

Thank you, got a working assembly but had to use WorldToScreenUE4 and it just doesn’t work correctly. Problem is Rotation isn’t 3 floats for some reason. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...