Main Menu
  • Welcome to The RPG Maker Resource Kit.

Airship

Started by Rune, March 13, 2007, 04:56:38 PM

0 Members and 1 Guest are viewing this topic.

Rune

I'm going to need an airship later in my game... would anyne happen to have a script or other way of doing this?

Also... how do I change monstter groups in the map? i.e. When you go onto snow, you fight snow monsters... but on grass you fight different enemies.

Again... thanks in advance ;)
Sincerely,
Your conscience.

Kokowam

#1
I think for an airship, that can be done with events.

For the second one, I don't really know. XP Maybe you could just make the places bigger so that you have a snow map and a non-snow map? :P

EDIT (Didn't want to repost): Sorry I'm so useless T_T

italianstal1ion

An airship...like you want it to pass over all tiles, though inpassable without the airship?
Use this. You have to have an item eqipped, but I'm sure it could be editted so if the item is in the inventory then you can walk through walls. Note: It is called a ring, but it can be anything equippable.
#===============================================================================
# ** Debug Ring
#-------------------------------------------------------------------------------
# Author    Icedmetal57
# Version   1.0
# Date      October 16th, 2006
#===============================================================================
#
# Description
#-------------------
# If a certain item is equipped, the player will be able to walk through walls,
# as if they were in DEBUG mode, in the RMXP editor.
#
# Instructions
#-------------------
# Scroll down a bit to the ACCESS_ID_NUMBER, and change it to the id number of
# the accessory you wish to have this debug type property.
#
# Compatability
#-------------------
# Compatible with SDK.
# To make it compatible with non-SDK, just delete the SDK lines.
#
#-------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
#SDK.log('Debug Ring', 'Icedmetal57', '1.0', 'Oct - 16 - 2006')

#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
#if SDK.state('Debug Ring') == true

class Game_Player < Game_Character
 
  ACCESS_ID_NUMBER = 107
 
  def passable?(x, y, d)
    # Get new coordinates
    new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    # If coordinates are outside of map
    unless $game_map.valid?(new_x, new_y)
      # Impassable
      return false
    end
    # If debug mode is ON and ctrl key was pressed
    if $DEBUG and Input.press?(Input::CTRL)
      # Passable
      return true
    end
    if $game_actors[1].armor3_id = ACCESS_ID_NUMBER and Input.press?(Input::CTRL)
      # Passable
      return true
    end
    super
  end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
#end

(i commented out the SDK lines, uncomment them if you use SDK)

And for the encounter difference, go on hbgames.org and search for Seph's Test Bed. There is an encounter control in there.

Blizzard

Could be shorter. =P And there's always CTRL...
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

italianstal1ion

Quote from: Blizzard on March 13, 2007, 08:45:18 PM
Could be shorter. =P And there's always CTRL...

shorter huh? I wouldn't know how :P
and besides, CTRL is only in debug

Blizzard

#5
Remove this in the default script and it's not anymore.

$DEBUG and

EDIT: Ok, out of my head:

# Debug Ring by Blizzard
#
# Set DEBUG_ID to the accessory ID which will allow phasing.

DEBUG_ID = 24

class Game_Player < Game_Character
 
  alias passable_debug_extra_later? passble?
  def passable?(x, y, dir)
    res = passable_debug_extra_later?(x, y, dir)
    return true if res
    nx = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    ny = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    return ($game_map.valid?(nx, ny) and $game_party.actors[0].armor4_id == DEBUG_ID and
        Input.press?(Input::CTRL))
  end
 
end


I just noticed Icedmetal has bugs there. O_o
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Rune

Hmm... thanks  ;)
I think i'll use the first script... but I'm going to need to know how to make an item unsellable... or so that you can't lose it or give it away.
And I'll also need an airship sprite... and a diagonal one if possible
Thanks in advance ;)
Sincerely,
Your conscience.

Blizzard

No problem, lol! I only wanted to make a point, the script might be buggy, I haven't tested it. You can make items unsellable by just setting their price to 0.
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Rune

Hmm... :( none of those scripts work... the first one gives me an error whenever i try moving...
Script 'Airship' line 54: NoMethodError occurred
undefined method 'armor3_id=' for #<game_actor:0x154cba8>

The line is:
    if $game_actors[1].armor3_id = ACCESS_ID_NUMBER and Input.press?(Input::CTRL)

The second script first, gives me a Syntax Error which I think I can sort... but then, before I can start, it gives me
Script 'Airship' line 9:NameError occurred.
undefined method 'passable?' for class 'Game_Player'

The line is:
  alias passable_debug_extra_later? passble?

If you can sort this out, that would be great ;) Thanks in advance
Sincerely,
Your conscience.

Blizzard

Typos, lol! Here's the fixed thing.

# Debug Ring by Blizzard
#
# Set DEBUG_ID to the accessory ID which will allow phasing.

DEBUG_ID = 24

class Game_Player < Game_Character
 
  alias passable_debug_extra_later? passable?
  def passable?(x, y, dir)
    res = passable_debug_extra_later?(x, y, dir)
    return true if res
    nx = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    ny = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    return ($game_map.valid?(nx, ny) and $game_party.actors[0].armor4_id == DEBUG_ID and
        Input.press?(Input::CTRL))
  end
 
end

Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Rune

#10
YAY!!!

[Edit]
Grrr...
When I try going through a wall when I don't have the item equipped... it comes up with an error:
Script 'Airship' line 13: NameError occurred
undefined local variable or method 'd' for #<Game_Player:0x1343f10>


[Edit 2]
I get the same error with it equipped
Sincerely,
Your conscience.

Blizzard

Fix'd.

# Debug Ring by Blizzard
#
# Set DEBUG_ID to the accessory ID which will allow phasing.

DEBUG_ID = 24

class Game_Player < Game_Character
 
  alias passable_debug_extra_later? passable?
  def passable?(x, y, d)
    res = passable_debug_extra_later?(x, y, dir)
    return true if res
    nx = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    ny = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    return ($game_map.valid?(nx, ny) and $game_party.actors[0].armor4_id == DEBUG_ID and
        Input.press?(Input::CTRL))
  end
 
end

Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

Rune

Grrrr... new error

Script 'Airship' line 11: NameError occurred.
undefined local variable or method 'dir' for #<Game_Player:0x1382c28>


This time it happens when I try to move again

(Why am I so crap at scripting?)
Sincerely,
Your conscience.