Possible to use init commands in the game xml?

0 views
Skip to first unread message

Rob3d

unread,
May 3, 2011, 11:45:35 PM5/3/11
to EveryGame
Is it possible to use commands like "<action type="quad_tap_name"
name="rmPORTAL" />" as an in location action or a tap action.

I'm trying to set up a button that will deal out 9 cards and then
shuffle the location those cards are in.

I got the dealing part down but I can't figure out how to get a tap
action to shuffle a target location.
Is this possible in the current version.

This is the last thing I'd like to add before posting my module.

Thanks in advance

Eggy

unread,
May 4, 2011, 3:00:02 AM5/4/11
to ever...@googlegroups.com
Currently, you can't trigger taps from the tap actions in the xml file. The format you're asking about is only used for the saved games, and essentially is tracking how the players have interacted with the game. Combining the two may be possible in the future, but would easily lead towards some potentially tricky bugs, so it's not something that we're rushing into.

However, you can certainly accomplish what you're asking about with existing tags. I would create a special piece called "shuffler", that is the same type as your other cards.

After moving your nine cards into the deck, also move the shuffler piece by name. Then run apply a shuffle_location action, using the "shuffle_location" action, applied to the "shuffler" piece (see the xml line below). For some reason, the ability to supply a target piece was left of of the docs, but it works for shuffle_location, just like every other action.

Now that the 9 card deck is shuffled, you can move the "shuffler" piece out again by name, and store it off-screen in some hidden location, ready for the next time somebody hits a button.

<quad_tap -- 9 moves>
...
<quad_tap -- move shuffler>
<quad_tap action="shuffle_location" args="shuffler">
<quad_tap -- move shuffler back to hidden location>
<piece>Button</piece>

-Nathaniel


Sent from my iPad

Rob3d

unread,
May 4, 2011, 8:18:53 AM5/4/11
to EveryGame
That's perfect thank you. I thought it was odd shuffle location was
the only command with no arguments, that why I immediately jumped to
init commands.

This should be it. Time to finish my module.


On May 4, 3:00 am, Eggy <eggy.everyg...@gmail.com> wrote:
> Currently, you can't trigger taps from the tap actions in the xml file.  The format you're asking about is only used for the saved games, and essentially is tracking how the players have interacted with the game.  Combining the two may be possible in the future, but would easily lead towards some potentially tricky bugs, so it's not something that we're rushing into.
>
> However, you can certainly accomplish what you're asking about with existing tags.  I would create a special piece called "shuffler", that is the same type as your other cards.
>
> After moving your nine cards into the deck, also move the shuffler piece by name.  Then run apply a shuffle_location action, using the "shuffle_location" action, applied to the "shuffler" piece (see the xml line below).  For some reason, the ability to supply a target piece was left of of the docs, but it works for shuffle_location, just like every other action.
>
> Now that the 9 card deck is shuffled, you can move the "shuffler" piece out again by name, and store it off-screen in some hidden location, ready for the next time somebody hits a button.
>
> <quad_tap -- 9 moves>
> ...
> <quad_tap -- move shuffler>
> <quad_tap action="shuffle_location" args="shuffler">
> <quad_tap -- move shuffler back to hidden location>
> <piece>Button</piece>
>
> -Nathaniel
>
> Sent from my iPad
>
Reply all
Reply to author
Forward
0 new messages