Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-14-2006, 04:49 PM
Prozac Prozac is offline
one of the good guys
Prozac's Avatar
Join Date: Jan 2006
Posts: 245
Prozac is on a distinguished road
Send a message via AIM to Prozac
zoom in gui window

Just a simple script that not fully functional, to comply with forum rules, since it does not have any actual useful information in the contents of the window.
Also as a brief explination to those new to scripting and gs2 of some of the basic commands. Kind of a neat effect.

PHP Code:
//#CLIENTSIDE
// by Prozac
function onWeaponFired(){onCreated();} //this line causes the window to open whenever the player logs in, or when the player selects the npc and presses D

function onCreated()
 {
 new 
GuiWindowCtrl("zoom_window")  // this makes a new window with the name zoom_window. The quotes tell the script to interpret the window name as a string.
   
{    
    
width 1;   //width ahd height tell the script how high and wide to make the window.
    
height 1;

    
= (screenwidth width) / 2;    //the x and y are where on the screen the top left corner of the window appears.
    
= (screenheight height) / 2;  //half of the screen height and width is the center of the screen.

    
canMove true;      //affects ability to move the window
    
canResize false;   //these are fairly self explanitory paramaters...
    
canMaximize false;
    
canClose true;
    
tile true;
    
text "Zoom Window";  //text in the top left title bar of the window
    
visible true;
  }


 for (
this.i=0this.i<100this.i++)
  {
   
//you can modify the attributes of a window with windowname.attribute, as seen here.
   
zoom_window.width+=5;
   
zoom_window.height+=5;
   
zoom_window.= (screenwidth zoom_window.width) / 2;
   
zoom_window.= (screenheight zoom_window.height) / 2;
   
sleep .05;   // this mades for a gradual expansion of the window instead of expanding it all at once
  
}


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 04:26 PM.


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