Individual Event Position in MGC's FPLE Script

dinobeat

Villager
Member
Joined
May 1, 2014
Messages
17
Reaction score
1
First Language
English
Primarily Uses
Hi, I've been tinkering with MGC's First Person Labyrinth Explorer script for a while. While I'm making (or trying to make) a "main" project with FPLE2 for XP, I'm using Ace's version for other things. My question is regarding the Ace version, specifically the position of events. MGC defined their visibility through a dy and dx set of values. Specifically, this is the relevant part in the code (line 728 if anyone uses the script):

 


#--------------------------------------------------------------------------
# * Vérifie la visibilité d'une surface liée à un évènement et l'ajoute
# à la liste des surfaces à afficher le cas échéant
# param surface : FPLE::Surface_Characters
# param dy : Integer
# param dx : Integer
# param surfaces_temp : Array<Array<integer>>
# param i : Integer
# param dir : Integer
#--------------------------------------------------------------------------
def add_character_surfaces(surface, dy, dx, surfaces_temp, i, dir)
return unless surface.character && surface.character.fple_type # [1.3]
j = i << 7
if dy.between?(128, j) && dx.between?(-j, j)
# the surface is visible
surface.set_relative_attributes(dir)
# adjustements depending on the surface type
if surface.type == 1
if surface.d_align == 0
dy -= 64
elsif surface.d_align == 2
dy += 64
else
end
elsif surface.type == 2
if surface.d_align == 0
dx -= 64
elsif surface.d_align == 2
dx += 64
end
end
# add the surface to the list
surfaces_temp.push([0, dy, dx, 5, 0, 0,
surface.bitmap.__id__, surface.type,
surface.v_align, surface.character.fple_stretch,
surface.opacity, surface.blend_type,
surface.fit, surface.zoom, surface.mirror]) # [1.5]
surface.displayed = true
end
end


Now, I know the 64 defines the relative position of the event alignment, but these are global. I've tried calling the first function ($add_character_surfaces), and using what I think are the arguments, but Ace always tells me I'm using an excess of arguments (4 or 5 instead of 0). What I'd like to do is call this function individually for an event, so that it wouldn't affect global positioning but would allow me to specify a different value (ie., 12, 35, 88, etc) instead of the fixed range. This would enable me to simulate non orthodox geometry (non orthodox as per what the script allows, such a longer wall corner or a rectangular prism).

Does anyone know if and how this can be made? Thanks in advance :)
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,859
Messages
1,017,030
Members
137,566
Latest member
Fl0shVS
Top