Cyberball Chat box Code


Author
Message
briancjo
briancjo
Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)
Group: Forum Members
Posts: 25, Visits: 167
Hi Supreme Being Dave,

Any help to code the chat box with programmable chat messages and responses as in the original.

Brian, cyberball noob
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
If you want the human player to be able to enter messages, you'd have to set up and run an <openended> trial element at the desired point in time. For the messages by the "virtual" / computer players, use and display a standard <text> element in the existing cyberball <trial> elements.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
I should add that it *may* be possible to implement something that's similar to the "chat" option [1] in the web-based Cyberball in Inquisit, but it *won't* be identical. The prime reason is that Inquisit trials are restricted to a single input modality (e.g. keyboard input OR mouse input, never both at the same time). I.e. it is not possible to have a trial allow for (a) typing some chat message AND (b) clicking on one of the players to pass the ball. Those would have to be handled by separate elements (e.g. an <openended> and a regular <trial> with mouse input).

[1] As far as I understand, the feature is optional and was only added to the most recent iteration of the Cyberball paradigm.

briancjo
briancjo
Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)Distinguished Member (4K reputation)
Group: Forum Members
Posts: 25, Visits: 167
so does creating an <openended> trial element also create the chat box. I'm confused as to what the code you suggested would actually look like when the script is running? will there be a box, does it just existed on the bottom on the screen?
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
An <openended> element provides a box for text input (i.e. you type into it). Your "chat box", the where the messages of the various players are displayed, would be a standard <text> element.

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Here's a very simple example to illustrate the <openended> / "chat box" part:

<block myblock>
/ trials = [1-4=chat]
</block>

<openended chat>
/ ontrialbegin = [values.chatmessages=concat(values.chatmessages, list.computermessages.nextvalue)]
/ ontrialend = [values.chatmessages=concat(concat(values.chatmessages, openended.chat.response),"~r")]
/ stimulusframes = [1=chatbox]
/ buttonlabel = "Send"
/ position = (50%, 90%)
</openended>

<text chatbox>
/ items = ("<%values.chatmessages%>")
/ position = (50%, 30%)
/ size = (30%, 40%)
/ txbgcolor = black
/ txcolor = white
/ hjustify = left
/ vjustify = top
/ erase = false
</text>

<list computermessages>
/ items = ("> Computer: Hi!~n", "> Computer: How are you?~n", "> Computer: What's your favorite food?~n", "> Computer: Nice!~n")
/ selectionmode = sequence
</list>


<values>
/ chatmessages = ""
</values>


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search