No announcement yet.

Data table and struct help

  • Filter
  • Time
  • Show
Clear All
new posts

    Data table and struct help

    Hi all, I'm working on a prototype. I'm wondering if there is a way to use data table to get a set of buttons pressed (Mostly 3 or 4 could change later) in an order within "x" duration and then setting a corresponding Boolean type variable.

    Here's how my csv looks like

    Button1, Button2, Button3, MovesName
    Move1, Up, A, A, SpMove1
    Move2, Up, A, B, SpMove2
    Move3, Up, A, X, SpMove3
    Move4, Up, A, Y, SpMove4

    These are 4 moves for example, I'll have about 30+ moves, not sure how many for now. I created a struct, with 3 arrays . Button1, Button2, Button3, set to type "Key". Each array has 4 elements, Button 1 has gamepad leftstick 4 directions, Button 2 and 3 have Gamepad 4 Face buttons. At this point I am not really sure if I need them to be in an array, or even set to "key" type for that matter. 4 variable MovesName is set to "bool".

    I guess all I want to do is for instance in Move 2, if UP, A, B are pressed only once within 2 seconds in the same order, then set bool type variable "MoveName" for that corresponding row to true.
    I'm attaching images of my structs and datatable.

    Any help on this will be appreciated.

    Click image for larger version

Name:	i17eGYG.png
Views:	1
Size:	55.0 KB
ID:	1191985
    Click image for larger version

Name:	vXn9rL4.png
Views:	1
Size:	53.7 KB
ID:	1191986
    Last edited by paploo; 08-19-2016, 12:14 PM.