Page 1 of 1

Boy, I'm stuck..!

PostPosted: Mon Dec 12, 2005 6:44 am
by Diana Kennedy
A few nasty issues:

For some reason I can't make work the "destroy actor" action on a certain actor.

I explain: There is a bird appearing in the game. If someone shoots that bird, a button appears saying "Hey you commited an infraction." I created this button via the bird actor, whith the mouse down event that created a short timer, making appear the button. (In fact, when the player clicks on the bird to shoot it) So far so good. But when I also created a timer that should make the button disappear after a while, it doesn't work.

Is there a limit to the actions / timers that can be created with the same event on the same actor? Or would there be another way to destroy the button after a certain time?

PostPosted: Mon Dec 12, 2005 11:56 am
by ingsan
No, normally, there isn't a limit for actions on a same actor. But I found it strange that my Timer doesn't work neither :?

Makslane, here is a Bird.ged. Maybe you could check whenether that is a bug.

Image Image Image

PostPosted: Mon Dec 12, 2005 12:32 pm
by makslane
You need handle the Timer event

Re: Boy, I'm stuck..!

PostPosted: Mon Dec 12, 2005 12:35 pm
by makslane
Diana Kennedy wrote:when I also created a timer that should make the button disappear after a while, it doesn't work.

Is there a limit to the actions / timers that can be created with the same event on the same actor?


There is no limit. Try create the timer in the button "Create Actor" event.
In the Timer event of button actor, just call "Destroy Actor" action.

Note: You must handle the Timer event in the actor that have a working timer. In this case, it's you button actor.

PostPosted: Mon Dec 12, 2005 1:36 pm
by ingsan
You must handle the Timer event in the actor that have a working timer
Oh yes, you are right !
So here's a new version of Bird !
new BIRD

PostPosted: Tue Dec 13, 2005 1:02 am
by Diana Kennedy
Hm...I am not sure I could understand. Nevertheless It works for now, because I just stole Ingsans Bird.ged, replaced the graphics and merged it into my game. Not nice, but I hope I can learn a bit how it works. I see that Ingsam worked with a script and wit visibility function, this weas not the case for me, I woirked with path following to make the bird fly and create / destroy actors.

But as a summarsy:

Did I understand right that: When Actor A creates Actor B with a timer, Actor B should have the destroying timer? I put both timers in A, to be started by the mouseclick on Actor , but this didn't work.

PostPosted: Tue Dec 13, 2005 11:48 am
by makslane
Diana Kennedy wrote:When Actor A creates Actor B with a timer, Actor B should have the destroying timer?.


If you create the timer in the actor B, the actor B must handle the timer events and timer destruction (if is a forever timer)

I put both timers in A, to be started by the mouseclick on Actor , but this didn't work.


Try use the "Create Timer" action in the actor A with this options:

Actor: B
Timer: your timer

Now, in the actor B, you can handle the Timer event to make what you want.

PostPosted: Sun Dec 18, 2005 1:58 am
by Diana Kennedy
As for this, thank you! It works by now, die to your help.