RGSS3 custom event movement only runs once

Anumania

Warper
Member
Joined
Sep 7, 2020
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
I have been stuck on this error for one of my scripts for a couple of days now and im not sure whats causing it, the code in question is here:


Ruby:
def self.create_ev2(x, y)
      ev = RPG::Event.new(x, y)
      ev.pages[0].graphic.character_name = 'Actor1'   
      ev.pages[0].graphic.character_index = 0
      ev.pages[0].move_type = 3
      ev.pages[0].move_route.list[0].code = 45
      ev.pages[0].move_route.list[0].parameters = ["print('test')"]
      Game_Event.new(@map_id, ev)
      $game_map.need_refresh = true
      game_ev = Game_Event.new($game_map.map_id, ev)   
      $game_map.events[ev.id] = game_ev
      return
    end
The issue is that when this event is spawned in, it does its movement code precisely once and then stops as if MoveRoute.repeat is false, in fact, the behavior is identical.
if it helps, this method is ran in at the end of Game_Map.setup(), but ive ran it from another event too and i get the same issue.

I think the error is somewhere past move_route because I set move_type to anything other than 3(custom) and the movement repeats just fine
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Add
ev.pages[0].move_route.repeat = true


 

Anumania

Warper
Member
Joined
Sep 7, 2020
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMVXA
repeat by default is true, no need, tested anyways, same result. I also tried force_move_route, and had the same result, but it ran the movement code twice instead of just once (both in the same tick).
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,090
Members
137,586
Latest member
Usagiis
Top