Graphics

 View Only
Expand all | Collapse all

"Family Feud" interactive game on xpression

  • 1.  "Family Feud" interactive game on xpression

    Posted 12-13-2013 05:33
    Imagine you are playing family feud during an NBA time out. I have laid out the game so that in the sequencer, there is a base layer with the BG and score, then each subsequent layer holds only a cube with the audience poll results. As the answer is said by the contestant, the operator clicks on that layer in the sequencer and the animation rotates to reveal the total number of answers. The hard part now is this: I need to be able to take the value on any given cube that rotates and add it to the score total. The layout was easy, the programming is above my pay grade. Does anyone feel like helping me out on this one? As always, thanks in advance.


  • 2.  RE: "Family Feud" interactive game on xpression

    Posted 12-13-2013 10:44
    Malcolm sounds like fun!

    The first thing you probably want to do is create a counter widget and link that to your total score. Now you won't be incrementing it in the traditional way by clicking up or down but rather by adding your text object values to it at specific frames of their animations. The other advantage of using the widget is it will be very easy to reset and could potentially be linked to other text objects in your project as needed.

    In each of your scenes containing the spinning cube with text you will want to add a script event to the scene director.

    The script will look like this(anything in quotes should be replaced by your object name)

    Dim counter as xpCounterWidget

    Dim text as xpTextObject

    Engine.GetWidgetByName("mycounter", counter)

    Scene.GetObjectByName("mytext", text)

    counter.value = counter.value + cint(text)

    Andrew

    #XPression


  • 3.  RE: "Family Feud" interactive game on xpression

    Posted 12-13-2013 14:48
    This reminded me of a sample I just made for someone else who wanted to be able to reveal any answer in any order. I used keyboard macros and multiple scene directors to be able to trigger any answer to flip on command.

    Take a look at this sample and it might give you some other ideas.

    http://ross.brickftp.com/f/2caf14fd9

    (beware the graphics are terrible; the point was to demonstrate the scripting/keyboard macros).

    #XPression


  • 4.  RE: "Family Feud" interactive game on xpression

    Posted 12-13-2013 17:58
    2,0:BC30734 'text' is already declared as a parameter of this method.

    also, if the value of the score is declared as a text object, can a text object be added to an integer? So far, I have had no luck. I have added the script you suggested to an invisible text layer in the scene, changed the names of the items in " " and get the above error message when I compile. Also, can I add this to a script event in the scene director so that it runs after a pause line?

    #XPression


  • 5.  RE: "Family Feud" interactive game on xpression

    Posted 12-13-2013 18:01
    Malcolm the idea here was to have this script run from the scene director not a text object.

    go to the scene director, right click and add a script event on one of your animation tracks. Use the script there.

    Andrew

    #XPression


  • 6.  RE: "Family Feud" interactive game on xpression

    Posted 12-13-2013 18:15
    Andrew,

    here is the script as it stands "FF_TOTAL" is my widget and "ANS_AMT" is the text object I am using for the score.

    here is the error code I get on compile

    7,0: BC30311 Value of type 'Xpression.xpTextObject' cannot be converted to 'Integer'.

    Dim counter as xpCounterWidget

    Dim text as xpTextObject

    Engine.GetWidgetByName("FF_TOTAL", counter)

    Scene.GetObjectByName("ANS_AMT", text)

    counter.value = counter.value + cint(text)

    #XPression


  • 7.  RE: "Family Feud" interactive game on xpression

    Posted 12-13-2013 18:19
    I may have made a little mistake I made a slight change below

    Dim counter as xpCounterWidget

    Dim text as xpTextObject

    Engine.GetWidgetByName("mycounter", counter)

    Scene.GetObjectByName("mytext", text)

    counter.value = counter.value + cint(text.text)

    #XPression


  • 8.  RE: "Family Feud" interactive game on xpression

    Posted 12-13-2013 18:22
    that did it, Andrew thank you so very much for your help on this. Where can I find

    a reference document for the various system elements such as xpCounterWidget rather than just asking you to write all my code for me?

    #XPression


  • 9.  RE: "Family Feud" interactive game on xpression

    Posted 12-13-2013 22:10
    You'll find the api helpfile in the Windows Start Menu -> XPressionStudio - >Help -> XPression SDK Help.

    It's more of a reference of all available commands than it is documentation.

    #XPression


  • 10.  RE: "Family Feud" interactive game on xpression

    Posted 12-24-2013 20:54
    One more (yeah right) request: I want to play an audio track "ding ding ding ding ding" if the player gets all the answers correct. In other words, if the total score equals 100, play the track. Thanks for the assist.

    #XPression


  • 11.  RE: "Family Feud" interactive game on xpression

    Posted 12-24-2013 21:31
    Take a look at the sample I posted earlier in this thread that showed how to trigger a scene director from a keyboard macro. You could use the same feature and place the audio track onto a separate scene director that gets triggered.

    #XPression


  • 12.  RE: "Family Feud" interactive game on xpression

    Posted 12-24-2013 21:47
    I get a reply that the file is no longer available, Brian. So, if I read you correctly I could actually set this entire game up on a single scene but with several directors that are triggered by keyboard macros?

    #XPression


  • 13.  RE: "Family Feud" interactive game on xpression

    Posted 12-24-2013 23:18
    Yes you are correct.

    Here it is again: http://ross.brickftp.com/f/b0c0fcd79

    #XPression


  • 14.  RE: "Family Feud" interactive game on xpression

    Posted 12-24-2013 23:44
    I will have to check it out when I get back to work on Thursday. I don't have Xpression at home. But thank you Brian.

    #XPression


  • 15.  RE: "Family Feud" interactive game on xpression

    Posted 12-26-2013 20:13
    Brian, I was never a fan of maple dipped doughnuts. However Boston Cream is another story. I think this could work for me instead of several scenes. How did you assign the various animation controllers to the ALT numbers?

    #XPression


  • 16.  RE: "Family Feud" interactive game on xpression

    Posted 12-26-2013 23:06
    It's done in the Keyboard Mapping menu (found in the Edit menu in the main menu). I assigned scripts to the different Alt key combinations and those scripts look for scene directors in the online scene and run them.

    #XPression


  • 17.  RE: "Family Feud" interactive game on xpression

    Posted 12-26-2013 23:21
    I think this is a great idea for my project, and for many other scenes I want for a quick recall. I am going to try and redesign the family feud game to be just one scene with several animation directors. Thanks for the advice.

    #XPression


  • 18.  RE: "Family Feud" interactive game on xpression

    Posted 01-16-2014 18:17
    Brian I can't get your example to trigger any animation. Am I missing something or skipping a step?

    #XPression


  • 19.  RE: "Family Feud" interactive game on xpression

    Posted 01-16-2014 18:35
    Disregard my last post Brian. I had to rename the scene directors and that did the trick

    #XPression


  • 20.  RE: "Family Feud" interactive game on xpression

    Posted 01-19-2014 02:55
    This works like a charm Brian. The entire game is controlled with keystrokes. From animating the clock on to revealing the answers. Thank you for the advice.

    #XPression