Forum rules - please read before posting.

Wait without pause gameplay

Hi Guys,

There is already a post with the similar question but I am still bit confused about it. I want the engine to start an animation for a different object after 5 seconds from a particular action of a different object.

For example: Character interacted with door (its done) now after 5 seconds I want something to fall from ceiling. Currently I am using Engine wait in the same Action of door's hotspot. So the character is "still" in the same place for 5 seconds and the the animation plays. 

Any other easy solutions.??

Also another question 2: Is there anything which will start running itself based on something else. For example lets say I disable a hotspot. I cant system to continuously check for this hotspot. once it is disabled, start doing this(something)

Sorry if I am very vague about the second question, I really don't know the terms and new to this game . Previously I tried Construct 2 for few days and I use Every tick --> check for this particular condition and this changes to that --> do this. I could use something like this here a lot. 

Thanks a lot in advance

Thanks a lot

Comments

  • edited June 2016
    1. You can set your door animation for 5 seconds longer ( I mean the door animation is done but after it is done it still plays on for  5 more seconds, just add an empty frame to the animation panel to 5 more seconds ) then you could set a check Wait till Finish ? in your Object: Animate and start whatever action after.
      The other way is to use varibale. Set a new variable doorDone bool, once you click on door set it to true and start your actionlist where you have varible check if doorDone is true start engine wait 5 seconds and do smth. after. Personally I'd go with the first solution.

     By  the way I see you mention that your character stays on for 5  seconds at the same place waiting . Make sure your actionlist/cutscene is set to Run In Background When Running in the inspector window of your actionlist/cutscene instead of Pause Gameplay, maybe you won't need my previous 2 advices.

    2. Again use variable, create variable HotspotDone and on your OnStart and OnLoad cutscenes, start an actionlist where you loop your check HotspotDone forever till it checks true then do smth.

    Not to worry, this is realy easy stuff. Once you get to know how to work with variables you will love it :)
     
  • edited June 2016
    Thanks SkyTree I understand that if I use variables it is lot better. 

    I have fews questions though!
    1. Is there is possible way to write compare every tick "this value" to "that value"?
    2. If Yes, where do I write that action.
    3. I read the first answer of this similar post "http://www.adventurecreator.org/forum/discussion/5099/wait-without-pause-gameplay". So how do I add a variable every second. I know how to add a variable now (thanks to you for the direction) but "every second" is what I am looking for now?

  • I guess you have to create an integer global variable. Name it CounterSeconds or something usefull.

    Then create an actionlist that loops (a node that points back to it's starting point):

    Engine pause for 1 second -> Variable set Global Variable CounterSeconds and increase by value 1 and then draw the node back to Engine pause again.

    When you need need a counter you could then call upon that actionlist by using Action List: Run and then check source to Asset file. Just make sure you set the integer to 0 before using the variable if you're using the same counter on different places in game.

  • Mathias  Does the system will wait for this to complete? Because I need something to run behind the game where nothing is paused. 




  • "Then create an actionlist that loops (a node that points back to it's starting point):"
    Where do I create this actionlist. On the Door? can I able to create an actionlist independently?how?
  • Okay I Got it!!! Thanks to SkyTree , Mathias and ChrisIceBox .

    How did I do it? (just in case any newbie like me needed this)
    I have a door where I need something to fall off from the ceiling after 5 seconds from accessing the door and I don't want system/engine to wait for it. I wanted it to run in the background where the game play normally in the mean time.

    Steps
    -->  Created an ActionList "Ceilingfall"(Right click on the Project Window --> Create --> Adventure Creator --> Action List).
    -->  In the Door Actionlist, I created an action 
                     Action Type: "Action List"  "Run"
                     Source : "AssetFile" and select your action list 
    --> Go to the newly created ActionList "Ceilingfall" by double clicking it on the Project Window. 
    --> Engine wait 5 seconds and set the next action for the required ceiling fall animation.
    --> Go to the inspector window for this ActionList "Ceilingfall" and under the Asset Properties -->When Running: Run in Background

    Thanks
                     
                     



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.