0 votes

Hello, I'm new to Godot and making games I want to make a simple 2D rock paper scissors game along with an image of either a rock, paper, or scissors (depending on what the player and the computer picked) and I've been wondering how to "spawn" an image on the scene during the game with a script, therefore, the player can see what the computer picked.

The answer is probably obvious but like I said I'm new to Godot.

Godot version 3.2.3
in Engine by (24 points)

1 Answer

+1 vote
Best answer

There's a few ways that you could do this. You could either have a sprite with the image of the rock, paper, or scissors with the visibility set to false, and then when one is picked, you set the visibility of that image to true. This would probably be easiest.
You could also make a sprite sheet where each frame is either rock, paper, or scissors, and then make an animation for each one. You would then play the animation based on whatever the choice was. I hope this helps, if not Just tell me so I ca hopefully clear it up a bit.

by (538 points)
selected by

Thanks! I tried both but the first one is easier so I'll just stick with that one for now.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.