[UT99]DrawText Variable Problem

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

ScrollMaster

SZ Mod Leader
Sep 28, 2004
122
0
0
Im becoming terribly frustrated because Im getting stuck at such simple coding and I have other example code to look at other mods and I have no idea why it will not work

if I were to put
Canvas.DrawText(Draw this Piece of text");
it will draw it

but when I try something such as draw me the ItemName of your weapon
Canvas.DrawText(PawnOwner.Weapon.default.ItemName);
compiles fine but of no its no there.... why is this... its driving me insane
why is it that when I try to draw variables it doesnt work? am I doing it wrong?
 

ScrollMaster

SZ Mod Leader
Sep 28, 2004
122
0
0
no error's no warnings,compiles perfectly but when I runUT nothing shows

and I know the function is drawing to the screen but as soon as I try to get it to draw a varilabe I get nothing... why WHYY!!! wuhuh lol
 

Ghost3021

Registered Hobbit
Nov 21, 2004
586
0
0
34
Behind you.
uhh.... u sure dere no errors? hmm....maybe your varialb points to teh wrong area. try dis:

pawnowner.weapon.inventory.itemname

hmmm..leme know if dat wokrs
 

porkmanii

New Member
Sep 9, 2004
129
0
0
Australia, Qld
pawnowner.weapon.inventory.itemname would be the item name for the next inventory item in the list (after "pawnowner.weapon").

You could try also logging the variable you are trying to draw (to see what it actually contains). Just remember to put in some way of limiting the number of times it logs (otherwise you get a log per tick/frame).

Have you made sure to set the position to draw at before calling DrawText? What about the font (which you shouldn't really need to change) and DrawColor?
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
ScrollMaster said:
no error's no warnings,compiles perfectly but when I runUT nothing shows

and I know the function is drawing to the screen but as soon as I try to get it to draw a varilabe I get nothing... why WHYY!!! wuhuh lol
Mychaeel doesn't mean compiler errors/warnings. He means log warnings during the game. Check UnrealTournament.log.
 
Last edited:

ScrollMaster

SZ Mod Leader
Sep 28, 2004
122
0
0
SZ_Compile.Rar
Heres a Compile of my whole file... oh and when you click the link, go Save as
and when you save the name click all files. and save as SZ_Compile.rar because it tries to download with no extention k
 
Last edited:

ScrollMaster

SZ Mod Leader
Sep 28, 2004
122
0
0
uhh so I threw this infront of my postrender. to see if my Pawn has Replication Information..... and and it doesnt? Im guessing this is because my Hud doesnt show up?
Why would it be returing as none? did I remove something estential to replicate infromation to the Pawn?

if ( (PawnOwner == None) || (PlayerOwner.PlayerReplicationInfo == None) )
return;

Anyone have any ideas? I pretty much ripped apart the ChallengeHud