Forum rules - please read before posting.

AC Triggers and procedurally generated content.

Hi everyone. I'm designing a game where a few places (i.e.: some dungeons) will be procedurally generated. There will be halls and rooms. Now the thing is I need to change AC cameras depending on where the player is: A top-down angle when walking in the halls, and a zoom in when the player reaches the interior of a room. The camera needs to go back to the top-down angled camera when the player leaves a room. This is easy to do on regular levels, but as I'm going to be creating the level procedurally, it becomes a problem. 

Now, I'll be using the DunGen Unity Asset which allows one to use whole rooms in the creation of a dungeon, this allows you to put specific things in the room before hand. Each room is basically a prefab. Problem is, as far as I remember you can't prefab an AC trigger, right? so I was wondering if there's a way to control the switching of the cameras some other way? maybe using unity Triggers? I just read a post where Chris mentions you can have several prefabs which a script can call as long as the constant ID is the same, maybe there's a way to enable or disable, or create and destroy cameras whenever a player enters a room? although that might become a little confusing...

Anyways, I'm unsure what would be the best path to accomplish this, so any advice would be greatly appreciated.

Comments

  • edited June 2016
    I see. So basically everything will be generated with the first scene start and stay so. And there is no way to place hotspots to trigger camera switch since you don't know where the halls marks/spots are.
     This might need some scripting on that generator asset somehow create and get positions of those spots where you want your camera switch and add AC hotspots to them.

    Edited: However I just noticed that you said you can put some things before hand I guess like entrances, exits, objects of interestrs that your level generator will work around. Then you might put hotspots triggers that can switch your camera, since you'd know the positions of your spots of interest. There is a tutorial about Tinpot swithcing cameras.

  • The introduction to paramters tutorial will be useful, speaking in general terms - as will the ability to run an ActionList asset whenever a Trigger is triggered.

    If you set a Trigger's Actions source field to Asset File, you can re-use the same ActionList whenever you want to e.g. switch to the current scene's top-down camera (provided that, as I was saying here, the ID number is always the same).
  • edited June 2016
    Yeah, but my general question is, can I use AC triggers somehow? (Edit: I was under the impression that you can't prefab AC Triggers? or am I wrong?) or should I just use unity triggers and run the action list asset from a script? (I'm assuming it'll be the latter, but I wanted to ask anyways, just in case...)
  • Actions built in a scene cannot be made into a prefab - this is why ActionList Assets are a separate feature.  However, once a Trigger's Action source is set to Asset File, it allows you to reference Actions that live in an asset.  Once this is done, you ought to be able to prefab the Trigger itself.
  • Great, 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.