JulyArt
New Developer
- 69
- Posts
- 4
- Years
- Seen Dec 17, 2021
STcooler progress:
The problem is that I often lose control and dash twice or more, or sometimes I don't dash at all. I think this is because the L input isn't taken into account at the right time. Not sure why though ^^"
So, looking at this, I'd need to study a bit regarding how the game talks regarding playerposition and stuff like that xD
This is starting to look beyond me at the moment xD but, it would add 'so much' in terms of jumping and stuff like that too if I learn how. So steadily I'll try.
Darn, I see the hic-hup. I think your code already accounts for 'don't let player continuously hold down L to get continuous dash' e.g. if dash was pressed and executed, it would need to be pressed again to dash again.
I'll try some stuff to see what goes on after reading over all the objects that's included in the code and how they operate with one another. (It's gonna be awhile, but dang, EXCITEMENT for player's Jump Jump Jump animation)
My skill at spriting animation is better than coding :') . Which is why I'm excited to bring 'characters' to life. I can't wait to dash in game with animation. HOLY after getting tired trying to debug code, I'll do the sprites since I feel like, this gonna happen . oooooooo
Spoiler:
Code:
I have an interesting attempt. In the file Game_Player, I rewrote the following function:
def move_generic(dir, turn_enabled = true)
# To block player movement when L is pressed
# return false if Input.press?(Input::L) && !@move_route_forcing
l_pressed = Input.press?(Input::L)
turn_generic(dir, true) if turn_enabled
if !$PokemonTemp.encounterTriggered
x_offset = (dir == 4) ? -1 : (dir == 6) ? 1 : 0
y_offset = (dir == 8) ? -1 : (dir == 2) ? 1 : 0
if passable?(@x, @y, dir)
return if pbLedge(x_offset, y_offset)
return if pbEndSurf(x_offset, y_offset)
turn_generic(dir, true)
if l_pressed
# Check three tiles forward.
fixed_offset = 1
for i in 1..3
fixed_offset = i if passable?(@x + (i-1) * x_offset, @y + (i-1) * y_offset, dir)
end
moveto(@x + fixed_offset * x_offset, @y + fixed_offset * y_offset)
elsif !$PokemonTemp.encounterTriggered
@x += x_offset
@y += y_offset
$PokemonTemp.dependentEvents.pbMoveDependentEvents
increase_steps
end
else
if !check_event_trigger_touch(@x + x_offset, @y + y_offset)
bump_into_object
end
end
end
$PokemonTemp.encounterTriggered = false
end
So, looking at this, I'd need to study a bit regarding how the game talks regarding playerposition and stuff like that xD
This is starting to look beyond me at the moment xD but, it would add 'so much' in terms of jumping and stuff like that too if I learn how. So steadily I'll try.
Darn, I see the hic-hup. I think your code already accounts for 'don't let player continuously hold down L to get continuous dash' e.g. if dash was pressed and executed, it would need to be pressed again to dash again.
I'll try some stuff to see what goes on after reading over all the objects that's included in the code and how they operate with one another. (It's gonna be awhile, but dang, EXCITEMENT for player's Jump Jump Jump animation)
My skill at spriting animation is better than coding :') . Which is why I'm excited to bring 'characters' to life. I can't wait to dash in game with animation. HOLY after getting tired trying to debug code, I'll do the sprites since I feel like, this gonna happen . oooooooo