Aller au contenu

Photo

how to print on the screen


  • Veuillez vous connecter pour répondre
12 réponses à ce sujet

#1
Fabb_u

Fabb_u
  • Members
  • 20 messages
Hi people, i have this problem:
I want to print on the screen a string from a script (like a timestamp for example).

The possible solutions that i know are:

1) the chat panel
2) a floating text on a creature's head


Are there other options for this problem ????

#2
Morbane

Morbane
  • Members
  • 1 883 messages
you could look up Lance Botelle's xml tutorial and bring up GUIs with your text....

#3
Fabb_u

Fabb_u
  • Members
  • 20 messages
I've read it and i have put the string on the screen but ... the game doesn't go on !

even if i put "modal=false" in the xml
and used the instruction DisplayGuiScreen(oPC, "screen", FALSE, "timestamp.xml");
in the script ....

Why ???

#4
Shaughn78

Shaughn78
  • Members
  • 637 messages
You should be able to use the function SendMessagetoPC()

I believe that will show the message in larger yellow font across the upper portion of the screen. MotB used this in their companion influence system.

#5
Tchos

Tchos
  • Members
  • 5 072 messages
I'm pretty sure you're talking about SetNoticeText(). SendMessageToPC() just puts text in the chat box.

#6
Fabb_u

Fabb_u
  • Members
  • 20 messages
Yes but the best solution is to draw the text on the interface using xml ... but i have to solve the problem !

#7
Morbane

Morbane
  • Members
  • 1 883 messages
actually the most efficient way would be to use the SetNoticeText() function.

it basically sends a text string to the screen in the default color of yellow.

the xml way requires the text be inside a little box/window that would block the screen whilst it was showing

but if you wanted to have like a whole paragraph - the xml way is the way to go

Modifié par Morbane, 05 novembre 2013 - 09:15 .


#8
Fabb_u

Fabb_u
  • Members
  • 20 messages
mmm i don't know this function, is for nwn2 scripting ?

#9
Fabb_u

Fabb_u
  • Members
  • 20 messages
ok, i tried the function and it's what i need, but is it possible to specify the position on the screen? because if it's only in the middle is not very usable ..

#10
Tchos

Tchos
  • Members
  • 5 072 messages
To change the position on the screen, you would need to use custom XML.

#11
Fabb_u

Fabb_u
  • Members
  • 20 messages
but with che custom XML i have to use displayGUIScreen which frozes the game ...

#12
Fabb_u

Fabb_u
  • Members
  • 20 messages
Ok ok ok ... it was my fault !

The screen was "frozen" because the attribute "fullscreen" of the xcml object "scene" was true, so it was covering everithing .... problem solved !

#13
Morbane

Morbane
  • Members
  • 1 883 messages
yay!