Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-04-2012, 09:34 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Sign messages

Hey guys,

today I made something similar like the say2() command for Shaded Legend. Itīs nothing special and I didnīt spend that much time on this. Basicly I first of wanted to try having it look like on Atlantis but for now this was ok aswell for me . If you use it you might want to change some things (as example the layout).



How you can change the layout:
  • You can change the background image by changing the layout_imageīs filename. The width of the GUI is related to the images width so make sure your image got the correct size.
  • You can change the backgrounds alpha by changing the layout_alpha
  • How fast the text will appear can be setted with the text_speed
  • The text below the GUI can be changed by editing text_a and text_s
  • In line 45 you can change the fontcolor.
  • I attached the background image I used for this. Feel free to use it.

It is right this part
PHP Code:
const layout_image "callimuc_say3background.png";
const 
layout_alpha 0.8;
const 
text_speed   0.1;
const 
text_a       "A - Close";
const 
text_s       "S - Scroll to bottom"
and
PHP Code:
profile.fontcolor = {
  
61,23,0,225
}; 



How you can use this:

This is just a really simple example:
  1. Create a class called function_say3
  2. Put this into the NPC you want to use this on. Just touch it than
    PHP Code:
    //#CLIENTSIDE
    function onCreated() {
      
    this.join("function_say3");
    }

    function 
    onPlayerTouchsMe() {
      
    this.say3("Hello this is your new sign!");

  3. For weapons you could use this and just fire the weapon than
    PHP Code:
    //#CLIENTSIDE
    function onCreated() {
      
    this.join("function_say3");
    }

    function 
    onWeaponFired() {
      
    this.say3("Hello this is your new message!");


Here you can find the script:
http://pastebin.graalcenter.org/read...d=102062213349

For those of you using a custom movement keep that there is enabledefmovement (line 101) and disabledefmovement (line 17) used. You should fit that with your movement than.


Well I donīt think there is that much more to say. If you have any suggestions or if there is anything bugged feel free to tell me.
Attached Thumbnails
Click image for larger version

Name:	callimuc_say3background.png
Views:	300
Size:	2.2 KB
ID:	54482  
__________________
MEEP!
Reply With Quote
 


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 12:58 AM.


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