Switch between controlling two different actors
scitunes
Member, Sous Chef Posts: 4,047
I have a platform game with two main actors in it and a bunch of bad guys. The first actor's job is two find the bad guys and reveal their identities (by colliding with them). this collision causes the bad guys to spawn a new bad guy with their identity revealed. When actor one has finished IDing the bad guys you need to go back to the beginning and find actor two. Then this actor goes and shoots the bad guys. I want to use the same control scheme for both actors (arrows and spacebar). So I created a boolean attribute so that when you click on actor one the arrow keys control it and when you click the mouse on actor two the arrow keys control it.
Here's the problem. when I put actor one in the scene and test it out everything works. Actor one causes the bad guys to spawn the new IDed badguys when it collides with it. But then I add actor two to the scene and everything works until actor one collides with a bad guy. then it crashes and GS shuts down.
Any ideas? Thanks guys!
Here's the problem. when I put actor one in the scene and test it out everything works. Actor one causes the bad guys to spawn the new IDed badguys when it collides with it. But then I add actor two to the scene and everything works until actor one collides with a bad guy. then it crashes and GS shuts down.
Any ideas? Thanks guys!
Comments
Then in actor one it says when camera follow is true - camera follows me
In actor 2 it says when camera follow is false - camera follows me
I also had to add each condition to each movement rule (left right and jump) so that only the actor that is controlling the camera will respond to the left right and space keys. Other wise they would both be moving around together.
Everything seems to work fine as far as switching back and forth between the two actors. But then when actor one collides with a bad guy in order to reveal its Identity (which is really just a spawn actor behavior) GS crashes.
Thanks for responding.
totally stumped!