- Joined
- Dec 17, 2012
- Messages
- 4,696
- Reaction score
- 935
- First Language
- English
- Primarily Uses
- N/A
So I'm trying to fix an issue with Victor's Character control. It is a compatibility issue, so I know he won't even bother looking at it. The problem stems from having events with offsets in their graphics. I have already implemented a patch for the system wherein not all poses of a character need to have the required offset. This worked seamlessly for the player, however now it seems that it isn't so good with events. I setup a small method that is supposed to log when a sprite's OY is changed, however it gives the following output:
[17:11:1.562335000] CHANGING OY FROM 0 TO 48 AT {0148}:1302:in `set_bitmap_position' {0160}:559:in `set_bitmap_position' {0148}:1252:in `set_character_bitmap'[17:11:1.564335000] CHANGING OY FROM 0 TO -24 AT {0160}:569:in `set_bitmap_position' {0148}:1252:in `set_character_bitmap' {0044}:60:in `update_bitmap'[17:11:5.695715000] CHANGING OY FROM 0 TO 96 AT {0148}:1302:in `set_bitmap_position' {0160}:559:in `set_bitmap_position' {0148}:1252:in `set_character_bitmap'[17:11:5.701719000] CHANGING OY FROM 0 TO -24 AT {0160}:569:in `set_bitmap_position' {0148}:1252:in `set_character_bitmap' {0044}:60:in `update_bitmap'One problem I've noticed is that all the responses say that they're changing OY from 0, but none of them say they change OY to 0. It just happens. It can't be caused by the oy method being overwritten, because I used the following, which is an alias (overwriting the method would mean my alias doesn't run, and the OY system would probably break entirely, given that it's a part of a hidden class):
alias aushsifghtnjkrerkw3eqiwjudhedfyjtnrek= oy=def oy=(val) puts "[#{(t = Time.now); "#{t.hour}:#{t.min}:#{t.sec}.#{t.nsec}"}] CHANGING OY FROM #{self.oy} TO #{val} AT \n\t#{caller[0, 3].join("\n\t")}\n" if @character.id == 6 aushsifghtnjkrerkw3eqiwjudhedfyjtnrek = valendThis is located within the Sprite_Character class. In order to illustrate my issue, here's a video of what's happening.
[17:11:1.562335000] CHANGING OY FROM 0 TO 48 AT {0148}:1302:in `set_bitmap_position' {0160}:559:in `set_bitmap_position' {0148}:1252:in `set_character_bitmap'[17:11:1.564335000] CHANGING OY FROM 0 TO -24 AT {0160}:569:in `set_bitmap_position' {0148}:1252:in `set_character_bitmap' {0044}:60:in `update_bitmap'[17:11:5.695715000] CHANGING OY FROM 0 TO 96 AT {0148}:1302:in `set_bitmap_position' {0160}:559:in `set_bitmap_position' {0148}:1252:in `set_character_bitmap'[17:11:5.701719000] CHANGING OY FROM 0 TO -24 AT {0160}:569:in `set_bitmap_position' {0148}:1252:in `set_character_bitmap' {0044}:60:in `update_bitmap'One problem I've noticed is that all the responses say that they're changing OY from 0, but none of them say they change OY to 0. It just happens. It can't be caused by the oy method being overwritten, because I used the following, which is an alias (overwriting the method would mean my alias doesn't run, and the OY system would probably break entirely, given that it's a part of a hidden class):
alias aushsifghtnjkrerkw3eqiwjudhedfyjtnrek= oy=def oy=(val) puts "[#{(t = Time.now); "#{t.hour}:#{t.min}:#{t.sec}.#{t.nsec}"}] CHANGING OY FROM #{self.oy} TO #{val} AT \n\t#{caller[0, 3].join("\n\t")}\n" if @character.id == 6 aushsifghtnjkrerkw3eqiwjudhedfyjtnrek = valendThis is located within the Sprite_Character class. In order to illustrate my issue, here's a video of what's happening.
