Action Loop

  • #1, by markus-creativeTuesday, 13. February 2018, 20:22 6 years ago
    Hello everybody!

    At a specific situation in a scene, I want to start an action, where NPCs do something, meaning go somewhere and talk something. This should be done endless, till the main character triggers something else.

    I made an action and with 'Jump to action part' the action loops.  The problem is, that while this action loops, nothing else is possible. I can't control the main character anymore, because the game is 'stuck' in this loop. The game waits, till the action ends, but of course the looped action won't end.

    How is it possible to have an action loop, while the game continues as normal and I still have full controll over the main character? In other words, I would like to have an action loop in parallel to the 'normal' game.

    I'm using 4.2.5

    Any help would be great!

    Newbie

    47 Posts


  • #2, by anna-arnoldTuesday, 13. February 2018, 20:36 6 years ago
    Hello, 
    I made a looping action that works in the Background with a Butterfly, that has to sit on a specific place to interact with. I think you should provide more information for help

    Though; the butterfly was no Character; it was just an animated object.

    Newbie

    95 Posts

  • #3, by afrlmeTuesday, 13. February 2018, 21:07 6 years ago
    Can you post some screenshots of the loop & other relevant stuff for what you are trying to do please?

    Imperator

    7278 Posts

  • #4, by markus-creativeTuesday, 13. February 2018, 21:16 6 years ago
    ok, here are more details of that specific scene...

    There's a pub scene with three NPCs and the main character.

    If the main character talks to one of the NPC, the three NPCs should start a discussion respectively have an argument. They talk to each other. They should continue having an argument. They should talk the same insults again and again. (a few lines of text).  I have done this with the action loop.

    While the NPCs are distracted by their intense discussion, the main character should be able to go around in the pub and fetch an item. After the item is in the inventory, the action loop, meaning the discussion of the three NPC  should stop.

    Newbie

    47 Posts

  • #5, by esmeraldaTuesday, 13. February 2018, 22:46 6 years ago
    You could do this by using an animation. Change the outfit or animation index of the NPCs so the idle animation is the arguing animation and use narration text instead of display text so the talk animation doesn't get triggerd. You can start the narration text with an action inside a frame. When the item is in the inventory change back the outfit/animation index.

    (edit: I don't know, if the animation index works on idle animations, but changing the outfit - or even the direction - should do)

    2. edit: thinking about it a bit longer... maybe what is blocking your character isn't the action loop itself but only the talking of the NPCs. It is possible that showing the Text as background text would do the trick.

    Key Killer

    513 Posts

  • #6, by markus-creativeWednesday, 14. February 2018, 03:11 6 years ago
    @esmeralda

    Thanks for the answer. I had already tried it with background text in the action loop, but it didn't help.

    But.... I did a quick test now and thanks to your cool idea respectively the suggested workaround with changing the outfit and the narration text it worked! smile I used narration text and checked it as background text. Thank you very much!

    BTW. I searched the forum for this problem, but couldn't find anything yet. I wonder, that nobody else had this problem before. Having an independent loop-able action without any restrictions simultaneously to the ongoing game would be great.

    Newbie

    47 Posts

  • #7, by afrlmeWednesday, 14. February 2018, 03:21 6 years ago
    Looping action blocks should work in the background unless you insert something into them that forces a cutscene to be triggered. Regular display texts or narration text unless defined as background texts automatically hide the mouse cursor & disable interaction when shown.

    I personally use looping action blocks all the time for adding small dynamic things such as pulsing/flickering lights. Triggering environmental animations after x random time passed & so on. They work in the background while I control the character.

    Imperator

    7278 Posts

  • #8, by markus-creativeWednesday, 14. February 2018, 03:50 6 years ago
    @AFRLme

    First I made an action for the NPC (call by other action) and in this action I had a few lines with text and jumped absolute to line one again. The text was marked as background text. The text was displayed again and again as intended, but the game of course stuck in this action and I had no cursor and couldn't control the main character any more.

    Now I made another outfit for this NPC and there I edited a frame in the standing animation, meaning added an action there and displayed text as background text and it worked. When the action mentioned in my posting above should now be triggered, I change the outfit of the NPC and the looping action starts while I can still control my main character.

    This was my mistake, I didn't know, that I have to put the action inside a frame of an animation.

    Newbie

    47 Posts