Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+3)

these are so cool! I'm trying the animated buttons out and am curious about something: I have one button that goes to another card and another that displays a line from the dialogizer. the contraption works perfectly, but in these two cases, the animation either isn't seen (going to another card) or finishes after the event has completed (dialogizer). is it possible to have the button animation finish and then complete whatever event is being handled in the script?

(+3)

Sure! You could modify the script of the AnimButton prototype to add another event. The existing script fragment that completes the animation looks something like:

if a~(count s)-1 c.animated:b.locked:0 else ai.text:1+ai.text end

Reformatted to be a bit clearer,

if a~(count s)-1
 c.animated:b.locked:0
else
 ai.text:1+ai.text
end

When "c" is set to no longer be "animated", we could inject a new event to the "card" (the outer scripts of the contraption instance):

if a~(count s)-1
 c.animated:b.locked:0
 card.event["finish"]
else
 ai.text:1+ai.text
end

It would also be a good idea to modify Prototype -> Properties... -> Template Script to include a handler for this new event:

on click do
end
on finish do
end
(+1)

this worked perfectly! thank you so much for your help :}