AS3 Flixel - Using FlxCamera

40 views Asked by At

Having trouble setting up multiple cameras in Flixel v2.55.

This s a 2d tile game. I'd like for the map and actors to be at zoom 2 and the hud and menus at zoom 1. Every game element is set into a FlxGroupXY (modified FlxGroup). I've googled this thing for 3 days now, tried every example and tutorial I could find to no avail. I've tried different things on my own, like giving each actor its own camera in its own class, etc. Just playing with it until I'm completely fed up. Sometimes I end up with this error: Error #2025: The supplied DisplayObject must be a child of the caller.

If anyone could recommend some code to try I would really appreciate it.

1

There are 1 answers

0
PHaZerous On

Problem was that I was setting the the cameras in the gamestate constructor. Had to override the create function and set the cameras there.