Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-22-2012, 03:48 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
Instead of starting a new thread, I thought I'd post in this one. I am also doing a weapon description in a similar way. But I had another idea but I need some help to complete it.

In the Weapon, I have this:

PHP Code:
function onSetDescription() {
 
player.description "blah, blah, blah";
 } 
In my Inventory, I have this for Weapon clicked:
This is the script where I need the help

PHP Code:
function onItemPressed(obj,bla,bla,bla,clickcount) {
  if (
clickcount == 1) {
    if (
IsObject("Inventory_Main")) {
      new 
GuiBitmapCtrl("Inventory_Item_Icon") {
      
play("age_click");
      
//TRIGGER THE 'onSetDescription()' on the clicked weapon  
      //What code would I put to do this???
        
screenwidth/2-615+500;
        
screenheight/2-340+100;
        
width height 32;
        
bitmap obj.normalbitmap;
        
layer 2;
      } 
And of course this displays the text in the INV script:

PHP Code:
 showText(213screenwidth/2-50screenheight/2+50"showg""b""DESCRIPTION:" @(player.description));
   
with (findImg(212)) {
    
textshadow true;
    
shadowoffset "-2 2";
    
shadowcolors "0 0 0";
    
font "showg";
    
style "b";
    
layer 23;
    
zoom 1;

Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:55 PM.


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