Warum funzt EntityOrder bei externer Funktion nicht

Übersicht BlitzBasic Blitz3D

Neue Antwort erstellen

 

andre x

Betreff: Warum funzt EntityOrder bei externer Funktion nicht

BeitragSo, Sep 11, 2005 20:26
Antworten mit Zitat
Benutzer-Profile anzeigen
Hi

Ich hab hier eine Funktion, die einen vertikalen Scrolltext ausgibt. Funzt auch alles soweit gut.

BlitzBasic: [AUSKLAPPEN]

sText$ = \"Test Text\"
hText = GG_Create_Text_Block(sText,50,35,1.5)
ScaleEntity hText,.75,.75,1
PositionEntity hText,-13.125,-10,-8
RotateEntity hText,45,0,0


Nun möchte ich aber die Z-Order mittels
BlitzBasic: [AUSKLAPPEN]




EntityOrder hText,-10

erhöhen. Das Ergebis ist leider nur die Fehlermeldung "Entity is not a model or camera".
Wieso kann ich das Entity scallieren, bewegen, etc. aber nicht den Z-Wert ändern?

Ebola33

BeitragSo, Sep 11, 2005 22:45
Antworten mit Zitat
Benutzer-Profile anzeigen
Ich glaube der Fehler liegt in deiner Funktion GG_Create_Text_Block() . Wie erzeugst du denn die Buchstaben ?
ansteckend... Wink
verstaubtes Projekt : http://www.mitglied.lycos.de/ebola33/
 

MegaTefyt

BeitragMo, Sep 12, 2005 9:51
Antworten mit Zitat
Benutzer-Profile anzeigen
Poste mal die Funktion oder das wichtigste aus ihr, sonst verkommt der Thread hier zum Ratespiel. Smile
 

andre x

Betreff: .

BeitragMo, Sep 12, 2005 16:25
Antworten mit Zitat
Benutzer-Profile anzeigen
Die Library heißt "GG Font Lib" und ist natürlich nicht von mir.
Die Bitmap Fonts werden mit einer seperaten Funktion eingelesen.

BlitzBasic: [AUSKLAPPEN]

Function GG_Create_Text_Block(sText$,iCharsPerLine% = 80,iAlign% = -1,fLineSpacing# = 1,fLetterSpacing# = 1,hParent% = 0)
; Create a collection of text lines that are all parented to a single pivot, which is returned.
Local hLine,hPivot,sTextPart$,i%,fLineY#,iSpace%
; If justified, use default letter spacing to prevent strange spacing.
If iAlign > 1 Then fLetterSpacing = 1
; Cannot exceed max chars per line.
If iCharsPerLine > GG_MAX_CHARS_PER_LINE Then iCharsPerLine = GG_MAX_CHARS_PER_LINE

hPivot = CreatePivot(hParent)
; Keep making text line objects until all text has been used.
While sText <> \"\"
If Len(sText$) >= iCharsPerLine Then
sTextPart = Left(sText,iCharsPerLine)
Else
sTextPart = sText
End If
If Len(sTextPart) = iCharsPerLine Then
; find the first space from the end for word wrapping
iSpace = GG_InstrRev(sTextPart,\" \")
If iSpace > 1 Then
sTextPart = Left(sTextPart,iSpace-1)
Else
iSpace = iCharsPerLine ; nowhere to break, so use the whole line
End If
; Remove the text part from the main text.
sText = Mid(sText,iSpace+1)
Else
sText = \"\"
End If
; If on the last line of text and the block is justified, make the last line flush left.
If sText = \"\" And iAlign > 1 Then iAlign = -1
; Make the text line object with the text part.
hLine = GG_Create_Text_Line(Trim(sTextPart),iAlign,fLetterSpacing,1,hPivot)
; Move the line down for line spacing.
PositionEntity hLine,0,fLineY,0
fLineY = fLineY - fLineSpacing * 1.8
Wend

Return hPivot
End Function

Neue Antwort erstellen


Übersicht BlitzBasic Blitz3D

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group