---
title: "repeat(_:count:)"
framework: spritekit
role: symbol
role_heading: Type Method
path: "spritekit/skaction/repeat(_:count:)"
---

# repeat(_:count:)

Creates an action that repeats another action a specified number of times.

## Declaration

```swift
class func `repeat`(_ action: SKAction, count: Int) -> SKAction
```

## Parameters

- `action`: The action to execute.
- `count`: The number of times to execute the action.

## Return Value

Return Value A new action object.

## Discussion

Discussion When the action executes, the associated action runs to completion and then repeats, until the count is reached. This action is reversible; it creates a new action that is the reverse of the specified action and then repeats it the same number of times.

## See Also

### Chaining Actions

- [group(_:)](spritekit/skaction/group(_:).md)
- [sequence(_:)](spritekit/skaction/sequence(_:).md)
- [repeatForever(_:)](spritekit/skaction/repeatforever(_:).md)
