Author Topic: Learning 'tile' commands  (Read 3532 times)

0 Members and 1 Guest are viewing this topic.

Offline NObamaTopic starter

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +325
  • Referrals: 2
    • View Profile
Learning 'tile' commands
« on: July 17, 2010, 09:51:38 PM »
0
Alright.  I just want a simple script that scans the tile I'm standing on and displays the #tilename...but it's late and I've been drinking...

Code: [Select]
Tile init
tile get #charposx #charposy %tilekind
display ok #tilename $
halt

Naturally, this returns N/A... *bog*

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +272
  • Referrals: 1
    • View Profile
Re: Learning 'tile' commands
« Reply #1 on: July 17, 2010, 10:59:19 PM »
0
Tile Init
Tile Cnt #charposx #charposy
for %Tilekind 1 #tilecnt
{
Tile Get #charposx #charposy %Tilekind
Display #Tilename
}
halt


Maybe? I dunno I always had a hard time with tiles.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline NObamaTopic starter

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +325
  • Referrals: 2
    • View Profile
Re: Learning 'tile' commands
« Reply #2 on: July 17, 2010, 11:14:17 PM »
0
I've tricked you!  While you were putting together this helpful tutorial, I stole subs from your miner and frankensteined them into XXII's script.  MUAHAHAHA.

(Seriously, though - thanks for trying to help.  Not sure it helps me understand yet, but I'll get there.)

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +602
  • Referrals: 2
    • View Profile
Re: Learning 'tile' commands
« Reply #3 on: July 18, 2010, 02:42:40 AM »
0
When you do your tile get you need to specify which layer.

Here's a sub out of the "XIIxOveR's Super Stuff" script:

Code: [Select]
sub TileStuff
   set %x #charposx
   set %y #charposy

   tile init
   tile cnt %x %y

   for %tcnt 1 #tilecnt
      {
      tile get %x %y %tcnt
      display Tile Information: , %x , x , %y , x , #tilez , #spc , Layer: , %tcnt , #spc , Type: , #Tiletype , #spc , Name: , #tilename , #spc , Kind: , #ltargetkind
      }
   }
return

One of the things you have to keep in mind about tiles is that they come in layers, that is the reason for MW's and my use of "tile cnt" and the for statements with #tilecnt. This will cycle through each layer of the tile and give the information for all of the layers, not just one.

Hope this helps m8.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Tags: