Sprite ByPass for Custom parralax

● ARCHIVED · READ-ONLY
Started by nio kasgami 1 posts View original ↗
  1. Hi people I work on a custom parralax script and I wanted to know if this requires a collision script for made "sprite" Impassable 

    I mean I have a irregular shape like a tree or something.

    so  here the script I this not complete  but i am not sure if my logics is good enough for the passability 

    Spoiler
    #===============================================================================# Super Simple Paralax Mapping System# created by : Nio Kasgami# data : 2014/08/23#------------------------------------------------------------------------------- # this little script allow to easely create parallax map without have to # spend hours on make each part ''non-passable''# Term of use# Credit as well Nio Kasgami# this script is enable for both commercial and non-commercial games#==============================================================================#==============================================================================# How to use#------------------------------------------------------------------------------# Rather simple to use. Only input in parrallax and the job will be done!# Therefore you will need to do yourself the maps in Parrallax method.# The mapping can be combined by the regular tileset mapping!#==============================================================================#==============================================================================# Disclaimer#-----------------------------------------------------------------------------# this Script require a lot of CPU data and it is not recommended to use it# in large map (Eg : World Map). # # Also this script not handle paralax water animation.#==============================================================================#==============================================================================# Customization#----------------------------------------------------------------------------- module NyaNya_Map # for people who still want the classic parralax method. # Add this notetag in the map note <Para> for activate the parallax # mapping system. NOTETAGS_ENABLE = true end #==============================================================================#==============================================================================# END OF CUSTOMIZATION#==============================================================================class Game_Map #-------------------------------------------------------------------------- # ● Overwrite the old parrallax method #-------------------------------------------------------------------------- #-------------------------------------------------------------------------- # ● creating parrallax layers #-------------------------------------------------------------------------- # Walking Layer def ground_layer @ground = Sprite.new @ground.bitmap = Cache.Parallax() @ground.z = 0 @ground.possibility_of_passability?(true) @ground.passability end # Environnement Layer def decora_layer @environnement = Sprite.new @environnement.bitmap = Cache.Parrallax() @environnement.z = 100 @environnment.possibility_of_passability?(false) @environnment.passability end # Sky Layer def sky_layer @sky = Plane.new @sky.bitmap = Cache.Parrallax() rescue nil @sky.z = 300 @sky.possibility_of_passability?(true) @sky.passability end #-------------------------------------------------------------------------- # ● checking if passable or not #-------------------------------------------------------------------------- def possibility_of_passability? if true @passables = true else @passables = false end end #-------------------------------------------------------------------------- # ● make the specific layer passable or not #-------------------------------------------------------------------------- def passability case @passables when true @dummy when false @dummy end end end#==============================================================================# END SCRIPT#==============================================================================  
    Naturally my logics is if the Passability? == false

    the sprite will not be passable at all UNLESS you put the region ID who will make the sprite passable 

    I don't want to use a supra complex algorithm for irregular shape I think the box is enough for a simple parralax mapping.

    thanks for help me 

    all regards 

    Nio Kasgami