# Loading a SKScene, but actions are not working

**URL:** <https://forums.kodeco.com/t/loading-a-skscene-but-actions-are-not-working/48608>\
**Category:** Swift\
**Created:** [September 8, 2018, 6:52pm UTC](https://forums.kodeco.com/t/loading-a-skscene-but-actions-are-not-working/48608 "2018-09-08T18:52:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jan-willem](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jan-willem/32/81494_2.png) [@jan-willem](https://forums.kodeco.com/u/jan-willem)\
**Post date:** [September 8, 2018, 6:52pm UTC](https://forums.kodeco.com/t/loading-a-skscene-but-actions-are-not-working/48608/1 "2018-09-08T18:52:21Z")

</div>

I do have a question about spritekit.

I’m drawing a sprite in a SKScene, make it really nice with children sprites and runactions (animations)

im loading the scene, copy the sprite and add it to my GameScene ( and doing nothing with the new loaded scene).

This new sprite appears on the screen, but all the SKActions (animations) don’t work anymore.  
What will be the solution, of course i can do it manually, but i prefer drawing them in a scene, less work and you can see instantly the result.

if let item = SKScene(fileNamed: “upgrade•item”) {

```
        if let item = item.childNode(withName: "upgrade") as? SKSpriteNode {
            
            if let item = item.copy() as? SKSpriteNode {

                addChild(item)
            }
        }
    }

```

}

anybody ? SKRefernceNode will also not work.

Jan-Willem

---

<div class="post-metadata">

**Author:** ![sgerrard](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sgerrard/32/93812_2.png) [@sgerrard](https://forums.kodeco.com/u/sgerrard)\
**Post date:** [September 8, 2018, 11:53pm UTC](https://forums.kodeco.com/t/loading-a-skscene-but-actions-are-not-working/48608/2 "2018-09-08T23:53:35Z")

</div>

I would try adding

> ```
> item.isPaused = false
> 
> ```

right after addChild(item).

---

<div class="post-metadata">

**Author:** ![jan-willem](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jan-willem/32/81494_2.png) [@jan-willem](https://forums.kodeco.com/u/jan-willem)\
**Post date:** [September 9, 2018, 6:18am UTC](https://forums.kodeco.com/t/loading-a-skscene-but-actions-are-not-working/48608/3 "2018-09-09T06:18:15Z")

</div>

Well, that worked, So thank you very much.

---

<div class="post-metadata">

**Author:** ![sgerrard](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sgerrard/32/93812_2.png) [@sgerrard](https://forums.kodeco.com/u/sgerrard)\
**Post date:** [September 9, 2018, 7:17am UTC](https://forums.kodeco.com/t/loading-a-skscene-but-actions-are-not-working/48608/4 "2018-09-09T07:17:45Z")

</div>

In case you are wondering, a similar issue, with a reference node instead of a copied node, came up in the 2D iOS Tutorial forum:

> [@Unable to swing the cat's tail like a boss (Chapter 7)](https://forums.kodeco.com/t/unable-to-swing-the-cats-tail-like-a-boss-chapter-7/35451):
>
> Hi, Following the instructions up to page 179 in the latest pdf, when I deploy CatNap to either a simulator or to my iPad, the animation for swinging the cat’s tail doesn’t seem to be triggered. I have noticed the following, which may be relevant: The cat’s tail does swing when I press animate in the Cat.sks action editor. The cat’s tail does not swing when I press animation in GameScene.sks editor. Changing the startup up scene to Cat.sks shows the swing action as expected. The provided “fi…

No one can explain why, but referenced nodes, and now copied nodes, seem to default to isPaused being true. Rather than battling it, it is easier to just set them to not paused when loading them.

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [February 22, 2019, 10:52am UTC](https://forums.kodeco.com/t/loading-a-skscene-but-actions-are-not-working/48608/5 "2019-02-22T10:52:24Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
