View Single Post
  #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