How to make and event trigger if the charachter is already on top of it?

DiegoBinder

Villager
Member
Joined
May 26, 2019
Messages
15
Reaction score
3
First Language
Portuguese
Primarily Uses
RMVXA
Basically I am trying to make a lava geyser that damages the player when the lava is up...I managed to make the animation, and even it deals damage if the geyser is already up and I touch it...but if I am already on the geyser's way and THEN it triggers, the characters take no damage...It looks like this:


This is what the codding looks like


This is the graphic without the geyser triggering..it has a timer on it


This is the geyser triggered..it only hurts the player if I touch it...but if I am already on the damage zone when it triggers, it does nothing (I already tried every combination of event touch and player touch...it still doesn't work)

Edit: I inverted the images accidentally...sorry
 

Ebanyle

açspasl~d~dfflass
Veteran
Joined
Sep 2, 2016
Messages
338
Reaction score
200
First Language
Portuguese
Primarily Uses
RMVXA
Sorry, your image links are broken, can't see them :'D
Try pasting this snippet on your script editor:
Code:
# By Dr.Yami

class Game_Event < Game_Character 
  def check_event_trigger_touch(x, y) 
    return if $game_map.interpreter.running? 
    if @trigger == 2 && $game_player.pos?(x, y)   
      start 
    end
  end 
 
alias testtee_move_straight move_straight
def move_straight(d, turn_ok = true) 
  testtee_move_straight(d, turn_ok) 
  check_event_trigger_touch(@x, @y)
end
end

class Game_Player < Game_Character 
  def start_map_event(x, y, triggers, normal) 
    return if $game_map.interpreter.running? 
    $game_map.events_xy(x, y).each do |event|   
      if event.trigger_in?(triggers)     
        event.start   
      end 
    end
  end
end
 

DiegoBinder

Villager
Member
Joined
May 26, 2019
Messages
15
Reaction score
3
First Language
Portuguese
Primarily Uses
RMVXA
Just right click on the image icon and "open image". (unless you tried that and it didn't work...if so...I will try to post it again)

Where do I post this? Because I created a new scrip page and it did nothing
 

Ebanyle

açspasl~d~dfflass
Veteran
Joined
Sep 2, 2016
Messages
338
Reaction score
200
First Language
Portuguese
Primarily Uses
RMVXA
Oh... right xD
Could you post a screenshot of the event page?
 

DiegoBinder

Villager
Member
Joined
May 26, 2019
Messages
15
Reaction score
3
First Language
Portuguese
Primarily Uses
RMVXA
Fire Animation 1 (It counts 2 seconds then triggers animation 2) Edit: First animation image was broken for some reason...so I reposted it...




Fire Animation2 (It triggers the damage for 1 second then it loops back to animation 1)



Damage trigger (It onlu deals damage when animation 2 is triggered)

 

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

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,476
Members
137,824
Latest member
dobratemporal
Top