Create a free account to remove all ad content.

Author Topic:  Magic Carpet  (Read 1671 times)

0 Members and 1 Guest are viewing this topic.

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Magic Carpet
« on: June 03, 2015, 05:40:47 AM »
Script: MagicCarpet
----------------------
if
  IsBlock [hvrel:0,-2,0] [none]
then
  SetBlock [hvrel:0,-2,0] [turkish]
endif
script [MagicCarpetCleanup] [prel:0,0,0]
script [MagicCarpetCleanup] [prel:0,-1,0]
script [MagicCarpetCleanup] [prel:0,-2,0]
script [MagicCarpetLoop]


Script: MagicCarpetLoop
---------------------------
wait [15]
script [MagicCarpet]


Script: MagicCarpetCleanup
-------------------------------
script [MagicCarpetCleanupBlock] [rel:1,0,1]
script [MagicCarpetCleanupBlock] [rel:1,0,0]
script [MagicCarpetCleanupBlock] [rel:1,0,-1]
script [MagicCarpetCleanupBlock] [rel:0,0,1]
script [MagicCarpetCleanupBlock] [rel:0,0,-1]
script [MagicCarpetCleanupBlock] [rel:-1,0,1]
script [MagicCarpetCleanupBlock] [rel:-1,0,0]
script [MagicCarpetCleanupBlock] [rel:-1,0,-1]


Script: MagicCarpetCleanupBlock
-------------------------------------
if
  IsBlock [rel:0,0,0] [turkish]
then
  SetBlock [rel:0,0,0] [none]

« Last Edit: June 03, 2015, 08:34:00 AM by Craig »

Dryym

  • Supreme Member
  • *
  • Posts: 4336
  • What's yours is mine. ~TM's Resident Master Thief~
    • View Profile
  • Xbox: dryym
Re: Magic Carpet
« Reply #1 on: June 03, 2015, 06:37:41 AM »
That [Prel:] better not be a typo Craig...

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Magic Carpet
« Reply #2 on: June 03, 2015, 07:17:38 AM »
That [Prel:] better not be a typo Craig...
I typo occasionally, but 5 times in a row? ::)

Dryym

  • Supreme Member
  • *
  • Posts: 4336
  • What's yours is mine. ~TM's Resident Master Thief~
    • View Profile
  • Xbox: dryym
Re: Magic Carpet
« Reply #3 on: June 03, 2015, 08:45:18 AM »
I typo occasionally, but 5 times in a row? ::)

Ok, So [prel:] is obvious, What is [hvrel:]?

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Magic Carpet
« Reply #4 on: June 03, 2015, 09:06:45 AM »
[prel: x,y,z] player relative (0,0,0 = bottom of feet).
[vrel: f,y,r] player view (direction) relative (0,0,0 = eye position). f=forward, r=right.
[hvrel: f,y,r] player horizontal view (direction) relative - Same as vrel except the up/down component of the players view angle is ignored.

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Magic Carpet
« Reply #5 on: June 03, 2015, 09:17:12 AM »
One can use a cutdown version of this to make tracks or roads.

Script: RoadMaker
----------------------
SetBlock [prel:1,-1,1] [Cobblestone]
SetBlock [prel:1,-1,0] [Cobblestone]
SetBlock [prel:1,-1,-1] [Cobblestone]
SetBlock [prel:0,-1,1] [Cobblestone]
SetBlock [prel:0,-1,0] [Cobblestone]
SetBlock [prel:0,-1,-1] [Cobblestone]
SetBlock [prel:-1,-1,1] [Cobblestone]
SetBlock [prel:-1,-1,0] [Cobblestone]
SetBlock [prel:-1,-1,-] [Cobblestone]
script [RoadMakerLoop]


Script: RoadMakerLoop
---------------------------
script [RoadMaker]


Start the script, walk the path you want the road to go, and presto, auto-road.

Dryym

  • Supreme Member
  • *
  • Posts: 4336
  • What's yours is mine. ~TM's Resident Master Thief~
    • View Profile
  • Xbox: dryym
Re: Magic Carpet
« Reply #6 on: June 03, 2015, 09:26:12 AM »
[prel: x,y,z] player relative (0,0,0 = bottom of feet).
[vrel: f,y,r] player view (direction) relative (0,0,0 = eye position). f=forward, r=right.
[hvrel: f,y,r] player horizontal view (direction) relative - Same as vrel except the up/down component of the players view angle is ignored.

So, With [Vrel:] If you were to use say,

"If
  Isblock [X] [vrel:10,0,0]
Then
  Do Y"

It would check if the block 10 blocks away from them, And in their reticle is X, And if so, It would do Y, Correct?

Also, Is this measurement based on a true distance, Or a block by block distance?

Creator of the term "Deathmine "
Jared [19|Oct 07:12 PM]: "It changes everything" Dryym

FatbFFA

  • Supreme Member
  • *
  • Posts: 2103
    • View Profile
    • ::)
  • Xbox: ETTP & Mr Zincy
Re: Magic Carpet
« Reply #7 on: June 03, 2015, 12:29:50 PM »
[Rrel:0,0,0]

For a radius



Jack Of Shades

  • Supreme Member
  • *
  • Posts: 3326
  • ☽♕۞♕☾
    • View Profile
    • Jack Of Shades Youtube Gaming Channel
Re: Magic Carpet
« Reply #8 on: June 03, 2015, 02:14:57 PM »
One can use a cutdown version of this to make tracks or roads.

Script: RoadMaker
----------------------
SetBlock [prel:1,-1,1] [Cobblestone]
SetBlock [prel:1,-1,0] [Cobblestone]
SetBlock [prel:1,-1,-1] [Cobblestone]
SetBlock [prel:0,-1,1] [Cobblestone]
SetBlock [prel:0,-1,0] [Cobblestone]
SetBlock [prel:0,-1,-1] [Cobblestone]
SetBlock [prel:-1,-1,1] [Cobblestone]
SetBlock [prel:-1,-1,0] [Cobblestone]
SetBlock [prel:-1,-1,-] [Cobblestone]
script [RoadMakerLoop]


Script: RoadMakerLoop
---------------------------
script [RoadMaker]


Start the script, walk the path you want the road to go, and presto, auto-road.

This would be perfect for RPG maps [or any map]. I need this.

crazytater94

  • Supreme Member
  • *
  • Posts: 2649
  • Mastering TM since 2011
    • View Profile
  • Xbox: crazytater94
  • PSN: crazytater94 (Inactive)
  • Steam: crazytater94
Re: Magic Carpet
« Reply #9 on: June 03, 2015, 02:16:43 PM »
I'm lost, this is like trying to read Chinese to me. Can someone dumb this down?