ID:271002
Dec 5 2006, 4:53 pm
|
|
How you make it so that when somone bumps an object such as a door a message pops up asking them if they want to enter or not and if so the icon open state flicks open and then once they have goten through the icon flicks back to closed. I looked at the dm guide but didnt understand the part that told me how to do this so can someon give me an example code.
|
In response to KirbyAllStar
|
|
Er, not quite...
Bump() is activated on the object that bumped INTO something, not an object that was bumped BY something... however, to achieve that effect (calling a bump() type proc before/after an object bumps into something), you just need to modify Bump() and add in a proc or two: atom Also, flick() pretty much returns immidiately, so you have to sleep the timing in which it was called before densing it again. To get an approximate timing done, it's: sleep( number of frames * frame delay ) - GhostAnime |
In response to GhostAnime
|
|
Doesn't flick finish all of the frames for that icon state? Thats what it does in my game, but yeah your right it does return quite quickly, I guess it just depends on how you create your icon state
|
In response to KirbyAllStar
|
|
Yeah, it does flick through the icon_state but what I am saying is that because you have density=1 right after flick(), it's usually like you never had density=0 in there before.
So lets say that the door animation had 10 frames with a delay of 1: density=0 - GhostAnime |
In response to GhostAnime
|
|
oh ok that makes since sorry about that
|
In response to KirbyAllStar
|
|
It's no problem, you learn more everyday :)
- GhostAnime |
That SHOULD work, I'm not sure but I think the src here would be the object.