Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[XP] Player touch activated how&where?

Hi,

My question is: where in the scripts is player touch handled? What script lines?

I'm using Seph's Pathfinding script, and would like to make it so that Player Touch events activate when the player moves over it because of the pathfinding. But I can't find ANYTHING on @trigger == 1 (that is player touch, right?) so I have no clue where to go and what to do. I got the script's demo and that does have it working, but I don't know where to look or for what line of code to find the fix. ^^

Thank you!
 
I'm pretty sure it's determined on lines 176 to 191 of Game_Event, which reads as follows:

Code:
  Â #--------------------------------------------------------------------------

  # * Touch Event Starting Determinant

  #--------------------------------------------------------------------------

  def check_event_trigger_touch(x, y)

    # If event is running

    if $game_system.map_interpreter.running?

      return

    end

    # If trigger is [touch from event] and consistent with player coordinates

    if @trigger == 2 and x == $game_player.x and y == $game_player.y

      # If starting determinant other than jumping is front event

      if not jumping? and not over_trigger?

        start

      end

    end

  end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top