Remember me
You are here: HomeForumCyberix3D ForumGeneral DiscussionHow to add a score using Variable and Label ?
Welcome, Guest
Username: Password: Remember me

TOPIC: How to add a score using Variable and Label ?

How to add a score using Variable and Label ? 8 years 9 months ago #134

Sorry for all these questions but here is another one..
I set a variable named: score and i set it's value to 0
Then how do i show this variable in the label object ?

Tried to penetrate some of the existing projects but didn't understood it :unsure:

Cheers
Last Edit: 8 years 9 months ago by Andreas-Malmqvist.
The administrator has disabled public write access.

How to add a score using Variable and Label ? 8 years 9 months ago #136

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 661
  • Thank you received: 628
Questions are a great tool for learning and to help others learn.
Feel free to ask as many questions as you like.

You need to use the Set command to set label.text = score

We have made a simple example:
www.gamemaker3d.com/player?pid=0164946

Press Space to increment the score.

Regards,
Cyberix3D team
The administrator has disabled public write access.
The following user(s) said Thank You: Andreas-Malmqvist

How to add a score using Variable and Label ? 8 years 9 months ago #138

Thanks a lot, it was the set label.text that i missed..
Btw, is there a way to do so that you have to release the spacebar and press it again to increment the score ?
Like a command that's able to detect when key, mouse key and etc is RELEASED.
As it is now holding down the spacebar increments the score at a rapid pace..

Cheers
The administrator has disabled public write access.

How to add a score using Variable and Label ? 8 years 9 months ago #139

  • cyberix3d
  • cyberix3d's Avatar
  • OFFLINE
  • Administrator
  • Posts: 661
  • Thank you received: 628
Key up event is not supported, But you can use the Wait command to slow down the process.
We have updated the example (clear your browser cache):
www.gamemaker3d.com/player?pid=0164946
Regards,
Cyberix3D team
The administrator has disabled public write access.

How to add a score using Variable and Label ? 8 years 9 months ago #140

Thanks, but that one i figured out myself (Becoming a real pro now ;)

Cheers
The administrator has disabled public write access.
Time to create page: 0.086 seconds