Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

How would I...

Heya, I'm new to scripting and I need to know some things.

I am making a choice selection. When the cursor is on the first choice, I want a picture to show up to the right.
When I am on the second choice, I want a different picture to show up. I have an idea:

if cursor = s1
show picture 1
end
if cursor = s2
show picture 2
end

How would I do that exactly?
 
A Simple Case Statement would work just fine here.

Code:
case @command_window.index
when 0
@sprite.bitmap = 'Command 1'
when 1
@sprite.bitmap = 'Command 2'
# ...
end

In your scene, in the update method, have something like this to control the pictures bitmap.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top