CROSS ENGINE: Combining Chrono Engine with Altimit Movement

● ARCHIVED · READ-ONLY
Started by Restart 206 posts Page 5 of 11 View original ↗
  1. DTurtle said:
    EDIT: your method does not work. oh well
    Yes, it does. I've personally implemented jumping in my game and I use CrossEngine.
    If you want help you'll need to post your event page where you're calling the jump command.
  2. AquaEcho said:
    Yes, it does. I've personally implemented jumping in my game and I use CrossEngine.
    If you want help you'll need to post your event page where you're calling the jump command.
    My apologies. I tried to implement what you suggested like this in the attachment. I have my jump command behind a skill and I'm using YEP Smart Jump to command the jump, and I've set region 10 to be blocked off. Ideally I would have it set for each direction, so no matter which way you're facing if there's a region 10 tiles two spots away then you can't jump -- I know that'll be different xy coords for each one but I was just testing with jumping down first. However, the player will still jump straight into region 10 even if it's 2 spaces down. I also tried to simplify the if check to "
    $gamePlayer.direction(2) && $gameMap.regionId(0,2) != 10" and that also doens't work. I then tried using "$gameMap.regionId(0,2) == 5" to allow jumping while facing down only if y2 is region 5 but that doesn't allow jumping at all even when on a map full of region 5.
  3. DTurtle said:
    My apologies. I tried to implement what you suggested like this in the attachment. I have my jump command behind a skill and I'm using YEP Smart Jump to command the jump, and I've set region 10 to be blocked off. Ideally I would have it set for each direction, so no matter which way you're facing if there's a region 10 tiles two spots away then you can't jump -- I know that'll be different xy coords for each one but I was just testing with jumping down first. However, the player will still jump straight into region 10 even if it's 2 spaces down. I also tried to simplify the if check to "
    $gamePlayer.direction(2) && $gameMap.regionId(0,2) != 10" and that also doens't work. I then tried using "$gameMap.regionId(0,2) == 5" to allow jumping while facing down only if y2 is region 5 but that doesn't allow jumping at all even when on a map full of region 5.
    Your current code is saying "If the players is facing down, and if the tile (0,2), which is a fixed tile on the map, is not region 10, then jump. What you actually want is ($gamePlayer.x+.5, $gamePlayer.y+.5+2). This won't be perfect because the player is not on a fixed position on a tile, because this is pixel movement and the player can actually be on four tiles at once. Which tile is 2 tiles south of the player if the player is standing on the corner of a tile?
    You're going to have to adjust the offsets and rounding of the player's position to define what tile you want to check the region of before you jump, and you'll have to tell the player to jump to the middle of that tile, which may not be directly south of the player but a few pixels right or left.
  4. AquaEcho said:
    Your current code is saying "If the players is facing down, and if the tile (0,2), which is a fixed tile on the map, is not region 10, then jump. What you actually want is ($gamePlayer.x+.5, $gamePlayer.y+.5+2). This won't be perfect because the player is not on a fixed position on a tile, because this is pixel movement and the player can actually be on four tiles at once. Which tile is 2 tiles south of the player if the player is standing on the corner of a tile?
    You're going to have to adjust the offsets and rounding of the player's position to define what tile you want to check the region of before you jump, and you'll have to tell the player to jump to the middle of that tile, which may not be directly south of the player but a few pixels right or left.
    ahh, that got it! Thank you so much! One more dumb question, do you know how I might activate a player touch event that's below character by jumping on it? I found this thread asking the same question, but when I tried the provided script with the specific xy coordinates of the event (in my case, a pitfall at 11,6) it still only triggers when walking into it. This is in a parallel process.

    Code:
    $gamePlayer.startMapEvent(11, 6, 1, true);
  5. DTurtle said:
    ahh, that got it! Thank you so much! One more dumb question, do you know how I might activate a player touch event that's below character by jumping on it? I found this thread asking the same question, but when I tried the provided script with the specific xy coordinates of the event (in my case, a pitfall at 11,6) it still only triggers when walking into it. This is in a parallel process.

    Code:
    $gamePlayer.startMapEvent(11, 6, 1, true);
    Player touch in Altimit triggers when you touch the border of the event. Event touch should trigger if you're inside the boundaries of the event
  6. AquaEcho said:
    Player touch in Altimit triggers when you touch the border of the event. Event touch should trigger if you're inside the boundaries of the event
    Right, but it doesn't actually trigger until another direction key is pressed. So for example, if use a Jump to move 2 tiles down and onto a tile that has a player touch event that's supposed to play a fall animation, wait, then move you back, none of that actually happens if you Jump or use a move route onto the tile.
  7. DTurtle said:
    Right, but it doesn't actually trigger until another direction key is pressed. So for example, if use a Jump to move 2 tiles down and onto a tile that has a player touch event that's supposed to play a fall animation, wait, then move you back, none of that actually happens if you Jump or use a move route onto the tile.
    Then at the end of the jump command, try this
    JavaScript:
    $gamePlayer.startMapEvent(this.character(0).x, this.character(0).y, [1, 2], false);
  8. AquaEcho said:
    Then at the end of the jump command, try this
    JavaScript:
    $gamePlayer.startMapEvent(this.character(0).x, this.character(0).y, [1, 2], false);
    That didn't work BUT it gave me an idea that has it pretty close. I'm testing a parallel event (see attached) that sets the player's xy and checks for that specific pithole I have on the map. The problem now is that with Altimit the xy is the bottom half of the tile rather than the full tile and I'm not sure how to account for that here.
  9. Hi, i have question. How can i disable diagonal movement for enemies?
  10. DTurtle said:
    That didn't work
    I do actually test the script calls I post before posting them and it worked for me. If the event is below the player and set to player touch or event touch it should trigger.

    The problem now is that with Altimit the xy is the bottom half of the tile rather than the full tile and I'm not sure how to account for that here.
    In Altimit using the default X of Player or Y of Player, or $gamePlayer.x/$gamePlayer.y references will return the pixel coordinate of the the top left pixel of the player. It is why I gave you $gamePlayer.x+.5 and $gamePlayer.y+.5 earlier to get you the middle pixel of the box.

    wecanfayo said:
    Hi, i have question. How can i disable diagonal movement for enemies?
    You would have to edit ChronoEngine's code to disable odd-numbered directions and only allow 2,4,6, and 8.
  11. AquaEcho said:
    You would have to edit ChronoEngine's code to disable odd-numbered directions and only allow 2,4,6, and 8.

    I'm afraid I'm not that good at java scripting for this, is there a simpler solution?
  12. wecanfayo said:
    I'm afraid I'm not that good at java scripting for this, is there a simpler solution?
    No, it's not built into the engine to disable diagonal movement for enemies, there are checks for diagonal movement in a lot of the enemy moveroute commands. The only way is to dig into that code and alias the functions allowing it.
  13. Okay, Then if we take mog_chronoengine as an example, can i change speed of diagonal movement.
    In standard chrono, the diagonal is faster than the cross movement.
  14. wecanfayo said:
    Okay, Then if we take mog_chronoengine as an example, can i change speed of diagonal movement.
    In standard chrono, the diagonal is faster than the cross movement.
    This is an issue with other diagonal movement plugins too and some have their own fixes for it. Are you using Altimit or just ChronoEngine by itself? I thought Restart made a fix for this in CrossEngine but I'd have to double check.
  15. AquaEcho said:
    This is an issue with other diagonal movement plugins too and some have their own fixes for it. Are you using Altimit or just ChronoEngine by itself? I thought Restart made a fix for this in CrossEngine but I'd have to double check.

    I returned to the chrono engine, because the restart has a broken collision, the enemies do not go around the walls, the main character also sometimes gets stuck in the walls. That's why I decided to try just chrono without the altimit, but the diagonal speed is broken there. I would like to solve this problem.
  16. wecanfayo said:
    I returned to the chrono engine, because the restart has a broken collision, the enemies do not go around the walls, the main character also sometimes gets stuck in the walls. That's why I decided to try just chrono without the altimit, but the diagonal speed is broken there. I would like to solve this problem.
    That isn't an issue specific to Altimit. Events don't automatically avoid walls without using pathfinding algorithms which are an expensive process in terms of system resources and will lag the game if you have more than one going at a time. You can see in this thread the topic creator is having problems with enemies running into walls and he's using the default engine.

    You could use a parallel process to check if an event, or several events, is facing a wall, or if it hasn't moved after x number of frames, trigger the pathfinding algorithm, or force it to turn left or right, but those will have their own complications.

    Cross Engine does have built in functions to check if player is stuck in a tile, then allow him to escape. If you're still getting stuck despite those checks you may need to adjust those functions to make them more sensitive or add another one your own.
  17. AquaEcho said:
    That isn't an issue specific to Altimit. Events don't automatically avoid walls without using pathfinding algorithms which are an expensive process in terms of system resources and will lag the game if you have more than one going at a time. You can see in this thread the topic creator is having problems with enemies running into walls and he's using the default engine.

    You could use a parallel process to check if an event, or several events, is facing a wall, or if it hasn't moved after x number of frames, trigger the pathfinding algorithm, or force it to turn left or right, but those will have their own complications.

    Cross Engine does have built in functions to check if player is stuck in a tile, then allow him to escape. If you're still getting stuck despite those checks you may need to adjust those functions to make them more sensitive or add another one your own.

    The problem with Altimit is that the enemies behave like idiots, he can stand in front of the corner and not move, instead of going around it, in the mog hunter chrono engine, the enemies bypass the objects. But, mog hunter demo has problem with diagonal speed. A friend of a Java programmer, could not figure it out...
  18. wecanfayo said:
    The problem with Altimit is that the enemies behave like idiots, he can stand in front of the corner and not move, instead of going around it, in the mog hunter chrono engine, the enemies bypass the objects. But, mog hunter demo has problem with diagonal speed. A friend of a Java programmer, could not figure it out...
    Again, that is not specific to Altimit. I linked you to a thread where that happens in the vanilla, default RPG engine with no Altimit.
  19. AquaEcho said:
    I do actually test the script calls I post before posting them and it worked for me. If the event is below the player and set to player touch or event touch it should trigger.
    Do you mind sharing the configuration you tested so I can see how it differs from mine?
  20. DTurtle said:
    Do you mind sharing the configuration you tested so I can see how it differs from mine?
    Code:
    $gamePlayer.startMapEvent(this.character(0).x, this.character(0).y, [1, 2], false);
    However I don't use your jump plugin, I use the jump_to function from Galv move route extras
    Code:
    this.character(-1).jump_to($gameVariables.value(30),$gameVariables.value(31));