Complex character movements, collision detection and infinite text pauses

  • #1, von BarneyMontag, 29. Juli 2013, 23:07 Uhr vor 12 Jahren
    OK, just for future posts: it so happens that questions don't pop up in my head one at a time, they usually come in bunches. Should I create individual threads for each question or group them like I did here?

    Anyway, here's what's on my mind now:

    1) Is there a way to make it so that every dialogue line is followed by an infinite pause? Currently I have to add after every line to achieve this effect, but it's a real chore.

    2) There's a zombie in my game, and I want to give him the typical slow zombie walk: step ahead, pause, moan, another step. However, I'm doing my best to assure that the game has a realistic look, i.e. characters' movement speed, animation cycles and walking sounds are synchronized in a way that creates an illusion that they are actually walking like real people, touching ground at the appropriate time and all that. So I actually need my zombie to stop on screen, dropping his character speed to zero, and wait a second before he starts to move again. Is there a way to do that? (I'm guessing I would need to use LUA, right?)

    3) I need a way to detect if the character has walked into a certain trigger zone. For starters, when he walks across the street and enters the house (all on the same screen), I want to change the sound of his footsteps. How do I activate the change when he steps over the threshold? Also, there's a scene where a monster starts advancing towards the hero and he has a limited time to solve the puzzle, otherwise the monster gets close and catches him. If I'm not mistaken I can create a monster character and move him using the "send character to position" command, but how do I detect that the hero and the monster are touching each other and it's time for a game over cutscene?

    This is a major problem for me. I don't think I can make my game without this kind of collision detection. Any advice on this matter would be greatly appreciated.

    Neuling

    42 Posts


  • #2, von afrlmeDienstag, 30. Juli 2013, 01:40 Uhr vor 12 Jahren
    1. there's no infinite pause/wait for click option for the dialog that I know of...
    you could just add a really high pause value like <p999999> or something.

    2. you can edit & add action parts or lua scripts to individual animation frames.

    3. create action areas for triggering actions on character enter/leave a certain area. action areas are found under the way system section. me & David were talking about a secondary action area type system just for setting up ground types, footstep sounds, character walk speeds etc - I don't know if it will get implemented though - although I hope it will at some point as it would be very useful.

    Foren Imperator

    7285 Posts

  • #3, von BarneyDienstag, 30. Juli 2013, 21:28 Uhr vor 12 Jahren
    Thanks!
    I think I've found a minor bug though: initially I put two action areas inside and outside the house to trigger different sounds, and what I've found out is that if these areas are situated right next to each other, for some reason they stop working soon enough - the sound changes a couple of times and then stays the same. After I've moved the areas farther apart this glitch disappeared.

    More importantly, I've realised there is an easy answer to the "collision detection" question. I didn't notice at first that when you use the "chase character" command, you can specify the action to be executed upon reaching the target character. I didn't have time to test this thoroughly, but I think this solves my "how to make the monster catch the hero" problem.
    Gotta say, I'm quite happy :-)

    Neuling

    42 Posts

  • #4, von afrlmeDienstag, 30. Juli 2013, 21:35 Uhr vor 12 Jahren
    ah yeah sorry; I only glanced over your post yesterday when I replied.
    yeah there is a chase character option. you can set the radius distance in pixels from the character being chased that the chaser has to touch/collide with to execute x action parts.

    I haven't really tested action areas all that much so I can't comment on the glitch you mentioned...

    Foren Imperator

    7285 Posts

  • #5, von afrlmeFreitag, 02. August 2013, 12:32 Uhr vor 12 Jahren
    http://wiki.visionaire2d.net/index.php?title=Texts

    according to the display text documentation page you can set infinite pause/wait until user clicks by adding after the text. check the link above for more commands.

    P.S: make sure you don't use it after executing an hide cursor action part as the game will be stuck on the displayed text because hide cursor is essentially the same as begin cut-scene apart from the fact that all key/mouse input is disabled until after cursor has been restored.

    Foren Imperator

    7285 Posts