Ooo, nice. Let's see if we can break it...
<!--rpgcode1--><div class='codetop'>CODE</div><div class='codemain'><span style="font-family:courier;font-size:11px;white-space:pre;">
<span style="color:#084;font-style:oblique;">*Board airship</span>
#<span style="color:#00F;font-weight:bold;">newplyr</span><span style="color:#80F;">(</span>"airship.tem"<span style="color:#80F;">)</span>
#<span style="color:#00F;font-weight:bold;">putplayer</span><span style="color:#80F;">(</span>playerHandle[0]$,playerX[0]!,playerY[0]!,<span style="color:#F80;">2</span><span style="color:#80F;">)</span> *We'll assume the layer 2 is the "air" layer
<span style="color:#084;font-style:oblique;">*And to land:</span>
#<span style="color:#00F;font-weight:bold;">newplyr</span><span style="color:#80F;">(</span>"hero.tem"<span style="color:#80F;">)</span>
#<span style="color:#00F;font-weight:bold;">putplayer</span><span style="color:#80F;">(</span>playerHandle[0]$,playerX[0]!,playerY[0]!,<span style="color:#F80;">1</span><span style="color:#80F;">)</span> * 1 is the ground layer
<span style="color:#084;font-style:oblique;">*Now, of course all this does is change the hero into a flying ship and</span>
<span style="color:#084;font-style:oblique;">*back again at will. If you want to leave the ship and have it stay there</span>
<span style="color:#084;font-style:oblique;">*for you to come back to later, you'll have to "remember" where you</span>
<span style="color:#084;font-style:oblique;">*parked it. Your landing method would look something like this:</span>
#<span style="color:#00F;font-weight:bold;">newplyr</span><span style="color:#80F;">(</span>"hero.tem"<span style="color:#80F;">)</span>
#<span style="color:#00F;font-weight:bold;">putplayer</span><span style="color:#80F;">(</span>playerHandle[0]$,playerX[0]!,playerY[0]!,<span style="color:#F80;">1</span><span style="color:#80F;">)</span>
<span style="color:#084;font-style:oblique;">*Remember where we put it</span>
#<span style="color:#048;">airship_X_location!</span>=playerX[0]!
#<span style="color:#048;">airship_Y_location!</span>=playerY[0]!
#airship_board$=BoardTitle[8]$
<span style="color:#084;font-style:oblique;">* You have to get creative here, since there's no variable that</span>
<span style="color:#084;font-style:oblique;">*contains the name of the current board. One way is to fill in</span>
<span style="color:#084;font-style:oblique;">*the name of the current board as one the layer names in the</span>
<span style="color:#084;font-style:oblique;">*board editor.</span>
#<span style="color:#00F;font-weight:bold;">layerput</span><span style="color:#80F;">(</span><span style="color:#048;">airship_X_location!</span>,airship_Y_location, <span style="color:#F80;">2</span>, "airship.gph"<span style="color:#80F;">)</span> * set down an image of the parked airship on the board
<span style="color:#084;font-style:oblique;">*Now to get on the airship, you need to check if the player is standing over it:</span>
#<span style="color:#00F;font-weight:bold;">if</span><span style="color:#80F;">(</span>airship_board$=BoardTitle[8]$<span style="color:#80F;">)</span>
{
#<span style="color:#00F;font-weight:bold;">if</span><span style="color:#80F;">(</span><span style="color:#048;">airship_X_location!</span>=playerX[0]!<span style="color:#80F;">)</span>
{
#<span style="color:#00F;font-weight:bold;">if</span><span style="color:#80F;">(</span><span style="color:#048;">airship_Y_location!</span>=playerY[0]!<span style="color:#80F;">)</span>
{
#<span style="color:#00F;font-weight:bold;">newplyr</span><span style="color:#80F;">(</span>"airship.tem"<span style="color:#80F;">)</span>
#<span style="color:#00F;font-weight:bold;">putplayer</span><span style="color:#80F;">(</span>playerHandle[0]$,playerX[0]!,playerY[0]!,<span style="color:#F80;">2</span><span style="color:#80F;">)</span>
}
}
}
<span style="color:#084;font-style:oblique;">* Also, you'll probably want the player to be able to see the airship</span>
<span style="color:#084;font-style:oblique;">* if you leave the board and come back. In your warp programs,</span>
<span style="color:#084;font-style:oblique;">* you'll have to do something like this:</span>
#<span style="color:#00F;font-weight:bold;">send</span><span style="color:#80F;">(</span> ... <span style="color:#80F;">)</span>
#<span style="color:#00F;font-weight:bold;">if</span><span style="color:#80F;">(</span>airship_board$=BoardTitle[8]$<span style="color:#80F;">)</span>
{
#<span style="color:#00F;font-weight:bold;">layerput</span><span style="color:#80F;">(</span><span style="color:#048;">airship_X_location!</span>,<span style="color:#048;">airship_Y_location!</span>, <span style="color:#F80;">2</span>, "airship.gph"<span style="color:#80F;">)</span>
}
#done
</span></div><!--rpgcode2--><hr /><form action="sav_rpgcode.php" method="POST"><a href="javascript:ShowHide('rpgcode0.60424900 1095534496_open','rpgcode0.60424900 1095534496_closed');">Save RPG Code</a>
<span id="rpgcode0.60424900 1095534496_open" style="display:none;"><textarea name="code" cols="60" rows="10">
*Board airship
#newplyr("airship.tem")
#putplayer(playerHandle[0]$,playerX[0]!,playerY[0]!,2) *We'll assume the layer 2 is the "air" layer
*And to land:
#newplyr("hero.tem")
#putplayer(playerHandle[0]$,playerX[0]!,playerY[0]!,1) * 1 is the ground layer
*Now, of course all this does is change the hero into a flying ship and
*back again at will. If you want to leave the ship and have it stay there
*for you to come back to later, you'll have to "remember" where you
*parked it. Your landing method would look something like this:
#newplyr("hero.tem")
#putplayer(playerHandle[0]$,playerX[0]!,playerY[0]!,1)
*Remember where we put it
#airship_X_location!=playerX[0]!
#airship_Y_location!=playerY[0]!
#airship_board$=BoardTitle[8]$
* You have to get creative here, since there's no variable that
*contains the name of the current board. One way is to fill in
*the name of the current board as one the layer names in the
*board editor.
#layerput(airship_X_location!,airship_Y_location, 2, "airship.gph") * set down an image of the parked airship on the board
*Now to get on the airship, you need to check if the player is standing over it:
#if(airship_board$=BoardTitle[8]$)
{
#if(airship_X_location!=playerX[0]!)
{
#if(airship_Y_location!=playerY[0]!)
{
#newplyr("airship.tem")
#putplayer(playerHandle[0]$,playerX[0]!,playerY[0]!,2)
}
}
}
* Also, you'll probably want the player to be able to see the airship
* if you leave the board and come back. In your warp programs,
* you'll have to do something like this:
#send( ... )
#if(airship_board$=BoardTitle[8]$)
{
#layerput(airship_X_location!,airship_Y_location!, 2, "airship.gph")
}
#done
</textarea>
<input type="submit" value="Save File" />
Preferred output method
RPG Code Program (*.prg): <input type="radio" name="output" value="program" checked />
HTML Syntax Highlighted (*.html): <input type="radio" name="output" value="html" />
GZip Compression?: <input type="checkbox" name="compress" value="true" /><hr /></span></form><!--rpgcode3-->