Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Superman95 on Sat 20/12/2003 18:25:25

Title: Object Views & Events
Post by: Superman95 on Sat 20/12/2003 18:25:25
I'm not sure what i'm doing wrong.
I've created a room with a lot going on.  The first time the player enters the room, another character runs out of it and into another.  So, in the interaction editor, I have two action.
1.  MoveCharacter(PROFESSOR, 287, 100, True)
2.  Move NPC to another room (PROFESSOR, 10)

I also have a couple of objects animating and they are always in the room, so in the player enters the room, I have script function that sets the object views and sets a timer to make them animate so often.

Then, in the repeatly execute, I check the time and animate the object every so often, it works greats.  The problem I am having is when the PROCESSOR is set to blocking, the player enters room, but the "player enters room" never gets called.   If I turn off blocking for the professor, then, the event is triggered.

I hope this makes sense.  I realize I could just add the setobjectview functions to the player first enters room too...and then they are called in both places, but this seems redundant.  And, again, it only happens when the character is blocking.  I think it might be timing, that the character takes too long to exit.  Anyway, if someone has thoughts, please share.

Thanks
Title: Re:Object Views & Events
Post by: Pumaman on Sat 20/12/2003 22:17:22
QuoteThe problem I am having is when the PROCESSOR is set to blocking, the player enters room, but the "player enters room" never gets called.

Could you elaborate on what you mean there? When what is set to blocking? Specifically, what are the names of the inteaction events you're referring to? "Player enters screen (before fadein)" or "After fadein"?
Title: Re:Object Views & Events
Post by: Dan2552 on Sat 20/12/2003 23:20:56
Quote from: Pumaman on Sat 20/12/2003 22:17:22
QuoteThe problem I am having is when the PROCESSOR is set to blocking, the player enters room, but the "player enters room" never gets called.

"Player enters screen (before fadein)" or "After fadein"?


The first time the player enters the room
Title: Re:Object Views & Events
Post by: Superman95 on Sun 21/12/2003 00:56:54
Oh, sorry.

it's the player enters screen (after fadein).

I'm not using the "before fadein" action.
Title: Re:Object Views & Events
Post by: Pumaman on Sun 21/12/2003 18:04:07
Ah yes, you're right - if you run a blocking command within First Time Enters Screen, then Enters Screen After Fadein won't get run. It's a bug, well spotted, I'll look into it.
Title: Re:Object Views & Events
Post by: Ginny on Tue 23/12/2003 17:50:07
Maybe you could solve it in the meantime by using MoveCharacterBackground? But I suppose it's supposed to be blocking so... :P
Title: Re:Object Views & Events
Post by: Superman95 on Tue 23/12/2003 22:45:41
I think I'm going start the character moving in the Character First Enter event and then in the After fadein event, I will put:
while(character[PROFESSOR].moving == 1)
 Wait(1);

I haven't tried it yet, but I can't see a reason why it wouldn't work.