You are viewing our Forum Archives. To view or take place in current topics click here.
I need help with adding score in LUA
Posted:

I need help with adding score in LUAPosted:

ThisIsChroma
  • Junior Member
Status: Offline
Joined: Feb 01, 20159Year Member
Posts: 96
Reputation Power: 3
Status: Offline
Joined: Feb 01, 20159Year Member
Posts: 96
Reputation Power: 3
If you know the code it would be appreciated if you posted it down below, or contact me on skype im.rimmata
#2. Posted:
D0SM3
  • TTG Senior
Status: Offline
Joined: Mar 29, 201410Year Member
Posts: 1,101
Reputation Power: 49
Status: Offline
Joined: Mar 29, 201410Year Member
Posts: 1,101
Reputation Power: 49
this for roblox? hahaha
onnly game i know that uses lua
#3. Posted:
ThisIsChroma
  • Junior Member
Status: Offline
Joined: Feb 01, 20159Year Member
Posts: 96
Reputation Power: 3
Status: Offline
Joined: Feb 01, 20159Year Member
Posts: 96
Reputation Power: 3
D0SM3 wrote this for roblox? hahaha
onnly game i know that uses lua

I personal game that im making for me and my friends lol
#4. Posted:
ProJimmyRustler
  • E3 2016
Status: Offline
Joined: Jul 14, 201410Year Member
Posts: 1,720
Reputation Power: 71
Status: Offline
Joined: Jul 14, 201410Year Member
Posts: 1,720
Reputation Power: 71
There really isn't a exact example code for doing this, but if you know the language enough you should be able to set something up that goes like this.

(Not sure if you are using a game engine or not)
Create an object that will hold your score.
Call it score. Then set it to zero.
"Score = 0"
Then what ever you want to keep track of, or have add score you will need to assign a value and have it add it when it's destroyed or collected.

Set a name for the score
"addScore = 10"

Then have it add to the score when an event happens i.e. Picking up a coin


I know this might be difficult to understand, but I don't use LUA that well.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.