Thread: Item's name on ground

Results 1 to 5 of 5
  1. #1 Item's name on ground 
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    719
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    The part highlighted in red, why would this not work? Trying to make it so drops on ground display its name like osbuddy.

    Code:
    	private void spawnGroundItem(int i, int j) {
    		NodeList class19 = groundArray[plane][i][j];
    		if (class19 == null) {
    			worldController.method295(plane, i, j);
    			return;
    		}
    		int k = 0xfa0a1f01;
    		Object obj = null;
    		for (Item item = (Item) class19.reverseGetFirst(); item != null; item = (Item) class19
    				.reverseGetNext()) {
    			ItemDef itemDef = ItemDef.forID(item.ID);
    			int l = itemDef.value;
    			//itemDef.id
    			 int col = 0x0000ff;
    			 aTextDrawingArea_1271.drawText(col, itemDef.name,  spriteDrawY, spriteDrawX);
    			if (itemDef.stackable)
    				l *= item.anInt1559 + 1;
    			// notifyItemSpawn(item, i + baseX, j + baseY);
    
    			if (l > k) {
    				k = l;
    				obj = item;
    			}
    		}
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Jan 2011
    Posts
    335
    Thanks given
    20
    Thanks received
    88
    Rep Power
    0
    You're calling it inside a method that is only called once. It'll have to go in updateEntities.
    Reply With Quote  
     

  3. #3  
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    719
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    Quote Originally Posted by Wrecked... View Post
    You're calling it inside a method that is only called once. It'll have to go in updateEntities.
    I tried messing with that function earlier and couldn't find where I would need to place it. Do you have any idea?
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Donator
    clrlslwi's Avatar
    Join Date
    Mar 2016
    Posts
    201
    Thanks given
    32
    Thanks received
    107
    Rep Power
    102
    There's a method used specifically for rendering overlays on the 3d scene (head icons, text, etc.) It should be placed there.

    I also do not see where you're setting the spriteDraw fields, assuming those are the output fields for the w2s projection method, you need to call that method first.

    Will post example later if I remember..
    Reply With Quote  
     

  5. #5  
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    719
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    Quote Originally Posted by clrlslwi View Post
    There's a method used specifically for rendering overlays on the 3d scene (head icons, text, etc.) It should be placed there.

    I also do not see where you're setting the spriteDraw fields, assuming those are the output fields for the w2s projection method, you need to call that method first.

    Will post example later if I remember..
    Lol please remember. I'm just doing it for learning purposes but would like to know what I am doing wrong. Thanks.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 05-21-2012, 12:50 AM
  2. Taking items on ground that are illegal
    By ParasyncheD in forum Tutorials
    Replies: 11
    Last Post: 12-30-2008, 09:38 PM
  3. Item names on attack tab
    By AlexMason in forum Tutorials
    Replies: 15
    Last Post: 07-12-2008, 03:54 PM
  4. Making an item appear on ground from nowhere!
    By k1ng 0f k1ngs in forum Tutorials
    Replies: 9
    Last Post: 07-10-2008, 05:46 AM
  5. making items spawn on ground
    By messiaH in forum Tutorials
    Replies: 4
    Last Post: 05-18-2007, 04:12 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •