php_bw_get_actions

object php_bw_get_actions(string replay_path, string player_name, action_type = REPASM_ALL_ACTIONS, int frequency = 10)

Lists the given type of actions made by the specified player, split in several arrays according to the given frequency. Tough, huh ? ;p
The idea is to allow the creation of charts "à la BWChart". Let's review the input parameters :


Now, what do we get in return ? An object containing as always ErrorCode and ErrorString and an array. This array contains arrays of objects and these objects are the actions where you will find the action's name (Name member), the time in seconds when it was made (Time member) and its parameters (Params member).
A small example now. Using this replay of Pusan vs Tossgirl, let's use the function this way : php_bw_get_actions($path_to_the_replay, "pusan[S.G]", REPASM_BUILD_ACTIONS, 10);
This should return an array containing arrays of build actions for Pusan only. Here's a print_r of the object RepASM returns : stdClass Object
(
    [ErrorCode] => 0
    [ErrorString] => OK
    [Actions] => Array
        (
            [0] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 49
                            [Params] => Warp,(115,46),Pylon
                        )

                    [1] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 49
                            [Params] => Warp,(114,45),Pylon
                        )

                )

            [1] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 50
                            [Params] => Warp,(114,45),Pylon
                        )

                )

            [2] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 85
                            [Params] => Warp,(116,47),Gateway
                        )

                )

            [3] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 106
                            [Params] => Warp,(115,22),Assimilator
                        )

                )

            [4] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 131
                            [Params] => Warp,(116,45),Cybernetics Core
                        )

                )

            [5] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 145
                            [Params] => Warp,(108,27),Pylon
                        )

                )

            [6] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 199
                            [Params] => Warp,(105,27),Robotics Facility
                        )

                )

            [7] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 231
                            [Params] => Warp,(118,31),Pylon
                        )

                )

            [8] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 255
                            [Params] => Warp,(112,47),Gateway
                        )

                )

            [9] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 270
                            [Params] => Warp,(114,32),Observatory
                        )

                    [1] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 270
                            [Params] => Warp,(115,31),Observatory
                        )

                )

            [10] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 280
                            [Params] => Warp,(115,31),Observatory
                        )

                )

            [11] => Array
                (
                    [0] => stdClass Object
                        (
                            [Name] => Build
                            [Time] => 289
                            [Params] => Warp,(126,20),Pylon
                        )

                )

)
)

Since : 4.0