Forum rules - please read before posting.

Turning Adventure Creator Off and On

edited April 2014 in Technical Q&A
In the two lines of code on http://www.iceboxstudios.co.uk/adventure-creator/tutorials/turning-adventure-creator-and, the < KickStarter > type specification is being stripped. Looks like it's just an HTML formatting issue. I'm using Chrome on Windows 7.

Also, the code doesn't seem to be working for me. Is it valid to run:
GameObject.FindWithTag (Tags.gameEngine).GetComponent< KickStarter >().TurnOffAC();
inside an Action?

Comments

  • Thanks for the alert!

    You're best writing this in a separate script, since Actions are a part of AC, and I can't guarantee things'll work properly if you call this in that way.  Looking at your code, though, it looks like it could be because of the spaces around KickStarter.

    Worth mentioning: 1.30 will bring the ability to disable individual AC-related systems.  It'll be a much easier/safer way of turning AC off and on again.
  • I put spaces around "KickStarter" so the forum wouldn't interpret (left-angle-bracket)KickStarter(right-angle-bracket) as an HTML tag and format it strangely. The code on http://www.iceboxstudios.co.uk/adventure-creator/tutorials/turning-adventure-creator-and displays properly in Firefox, but in Chrome it formats incorrectly like this:
    GameObject.FindWithTag (Tags.gameEngine).GetComponent ().TurnOffAC ();
    Notice that GetComponent is missing the type specifier for KickStarter.

    This past weekend, I ended up doing exactly what you suggested to disable AC temporarily, and it works fine.
  • I made a PlayMaker action that turned off AC. But it must be inside a OnUpdate to keep it turned off.
    What I get is the Wait cursor. But I can't interact with other objects - in this case an in-game PowerUI HTML form.
    What is the correct way to temporary hand over controls from AC, including inputs?
  • Actually it seems to work! As long as it is not inside a trigger.
  • Just so you know: update 1.30 will include a new Action called Engine: Manage systems.  This will give you full control over each of AC's systems, allowing you to turn on/off Input, Movement, Camera, Triggers etc all separately, making it much easier for you to override particular systems.
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.