Do After n seconds block prevents screen fadeout

Pixel Pusher

  • Posts: 152
This behavior doesn't switch to stage 1 as it should after the wait time using it as it is in the picture here.

However, if I remove the "Do after Wait to Fade seconds" block and place the "Fade out for screen fade time" block at the bottom by itself the game then fades out and into stage one like it should.

What happens? I don't see any errors.

rob1221

  • *
  • Posts: 9062
Try using a boolean to stop the behavior rather than the "disable this behavior" block.

Pixel Pusher

  • Posts: 152
That didn't work. this is how it was originally when it did work in 1.3x. I never changed anything. I'll dabble some more and see. I got word that it didn't work from folks on Forge who downloaded the "Alien Contact Source". I'm just trying to fix it up some more so it'll be more useful.

It didn't error out but the behaviors didn't work right.

Thanks....

rob1221

  • *
  • Posts: 9062
How did you set up the boolean attribute?  The reason your current behavior doesn't work now is probably due to a change to stop actor timed events after a kill block (and maybe disable as well).

Pixel Pusher

  • Posts: 152
In the "Created" event I set a Boolean "StartedGame" to false and replaced the Disable this behavior block with a StartedGame to true in the Actor - Any event.

I also have a modified Health behavior attached to it. I removed that behavior and it worked fine but the explosion didn't happen.

I'm also using a modified (merged behavior, the old health behavior merged with the explode on death).

This is what's SUPPOSED to happen, as it did before
Shoot the start actor with the bullet, the bullet dies, the start dies, explodes, fades out the sound, then fades out / into level 1.

Pixel Pusher

  • Posts: 152
Well, this is what I got now, and it works. The kill block prevents the scene from fading out/in. You are correct. I Can't figure out when the kill block initiates but must be before the fadeout or it wont work.

I just remedied the issue using a hide sprite so it "appears" to die then kill it off officially after the transition. I'm not using the health behavior anymore, just what you see here in the one Start behavior.

Pixel Pusher

  • Posts: 152
Anyway, that was the Alien Contact Source game.

I'm working on the Shump Example Game for 3.0 now. It all works well but one thing, after the player is killed off, there is a message to tell the player ship that when the playerDefeated message is heard, to wait x amount of time then transfer to the Game Over screen.

I've looked through and the only kill self block is before the message to defeat the player and the switch scene is not switching.

It does not transfer. What gives?

EDIT:
Smack me if I'm right and I'll resolve this issue.

Since the player is being killed off, then the switch scene is set to a message, it would not work because none of the actor's behaviors are able to do anything because the actor is no longer alive.

I'll assume that and work from there.


« Last Edit: October 10, 2012, 12:40:39 pm by Pixel Pusher »