Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-23-2004, 10:36 AM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
Showimg/showtxt

I am trying to do a showimg/showtxt in relation to the screen's position, and not a grid of the level, something that would display basically like a GUI, like "in the center of the screen" as opposed to "the center of the level".

This is what I have, but it's still level based and not screen based.

NPC Code:

if (created) {

showtext 1,3,18,fixedsys,, blahblah;
showtext 2,3,20,fixedsys,, blahblah;
showtext 3,3,22,fixedsys,, blahblah;
showtext 4,3,24,fixedsys,, blahblah;
showtext 5,3,26,fixedsys,, blahblah;
changeimgcolors 1,211,1,21,255;
changeimgcolors 2,211,1,21,255;
changeimgcolors 3,211,1,21,255;
changeimgcolors 4,211,1,21,255;
changeimgcolors 5,211,1,21,255;
changeimgzoom 1,1.5;
changeimgzoom 2,1.5;
changeimgzoom 3,1.5;
changeimgzoom 4,1.5;
changeimgzoom 5,1.5;

}



Any suggestions?
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
  #2  
Old 10-23-2004, 11:29 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
changeimgvis
Reply With Quote
  #3  
Old 10-23-2004, 03:01 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
And if you still have no clue about what Jagen is taking about, just read newfeatures, it explains quite well about changeimgvis.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #4  
Old 10-23-2004, 04:41 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
You can use
NPC Code:
changeimgvis index,layer;

.
A layer of 4 or higher (up to 12 or something. Not sure exactly how high it goes unless it was raised...) will display on the screen position.
If you are trying to show something on the direct center of the screen, put 'c' for Center in the formatting part of showtext and use screenwidth/2 and screenheight/2.
Images can use:
NPC Code:

x: screenwidth/2-(imgwidth(image name.png)/2)
y: screenheight/2-(imgheight(image name.png)/2)



If thats for a GUI, use indexes for showimg/showtext that are 200 or higher.

If you don't want it level-based, make it an NPC Weapon.
offline: toweapons -System; (or something) (clientside)
online: addweapon -System; (or something) (serverside)
Reply With Quote
  #5  
Old 10-23-2004, 05:20 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally Posted by Slash-P2P
NPC Code:

x: screenwidth/2-(imgwidth(image name.png)/2)
y: screenheight/2-(imgheight(image name.png)/2)

NPC Code:

(screenwidth-imagewidthstuff)/2


Same effect, looks cleaner (in my opinion)
Reply With Quote
  #6  
Old 10-23-2004, 05:23 PM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
Quote:
Originally Posted by Python523
NPC Code:

(screenwidth-imagewidthstuff)/2


Same effect, looks cleaner (in my opinion)
Yes it does
Reply With Quote
  #7  
Old 10-27-2004, 09:27 AM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
Wow, thanks you guys. Newfeatures annoys the hell out of me, the way they added those is sloppy. >.>
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
  #8  
Old 10-27-2004, 05:25 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Python523
NPC Code:

(screenwidth-imagewidthstuff)/2


Same effect, looks cleaner (in my opinion)
I don't really think it's a matter of opinion, here.
Reply With Quote
  #9  
Old 11-12-2004, 07:37 PM
Salaisuus Salaisuus is offline
Registered User
Join Date: Mar 2004
Posts: 68
Salaisuus is on a distinguished road
Speaking of showtext,
I cant get it to work online.

if (created) {showtext 1,30,30,,,ehhh?;}

Uhm, it isnt deprecated or anything?
Reply With Quote
  #10  
Old 11-12-2004, 07:50 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Salaisuus
Speaking of showtext,
I cant get it to work online.

if (created) {showtext 1,30,30,,,ehhh?;}

Uhm, it isnt deprecated or anything?
It needs to be clientside.
Reply With Quote
  #11  
Old 11-12-2004, 07:52 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally Posted by Salaisuus
Speaking of showtext,
I cant get it to work online.

if (created) {showtext 1,30,30,,,ehhh?;}

Uhm, it isnt deprecated or anything?
clientsided?
gmap?

showimg index,@font@style@text,x,y; is deprecated, since showtext replaced it
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #12  
Old 11-12-2004, 09:31 PM
Salaisuus Salaisuus is offline
Registered User
Join Date: Mar 2004
Posts: 68
Salaisuus is on a distinguished road
Clientside, sure, yeah, I knew that, Im smart, Im realy smart, I shut up now, ignore me.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.