Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

How do I put a TimerTrigger's time in Text?

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
Ol1vver
Superfighter
Superfighter
Posts: 69
Joined: Mon Nov 19, 2018 4:55 pm
SFD Account: olv
SFD Alias: olv
Started SFD: PreAlpha 1.6.4
Gender:

How do I put a TimerTrigger's time in Text?

Post by Ol1vver » Thu Nov 22, 2018 3:22 pm

Hello, I'm trying to make a car with fuel, and I want to make a Text marker that will show how much fuel is left. Is there a way to do this without scripts, or with scripts? :?:
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Thu Nov 22, 2018 3:52 pm

Ol1vver wrote:
Thu Nov 22, 2018 3:22 pm
Hello, I'm trying to make a car with fuel, and I want to make a Text marker that will show how much fuel is left. Is there a way to do this without scripts, or with scripts? :?:
If you want a script-free solution, well, you are in the wrong place, my friend.

For a script request, instead, just provide more information of how this mechanic should work and I'll be glad to help.
0 x

User avatar
Ol1vver
Superfighter
Superfighter
Posts: 69
Joined: Mon Nov 19, 2018 4:55 pm
SFD Account: olv
SFD Alias: olv
Started SFD: PreAlpha 1.6.4
Gender:

Post by Ol1vver » Thu Nov 22, 2018 4:06 pm

JakSparro98 wrote:
Thu Nov 22, 2018 3:52 pm
Ol1vver wrote:
Thu Nov 22, 2018 3:22 pm
Hello, I'm trying to make a car with fuel, and I want to make a Text marker that will show how much fuel is left. Is there a way to do this without scripts, or with scripts? :?:
If you want a script-free solution, well, you are in the wrong place, my friend.

For a script request, instead, just provide more information of how this mechanic should work and I'll be glad to help.
I have made a car and a fuel meter. I want to make it so, when you interact with the BgValve (ActivateTrigger), the cars starts moving and there's a TimerTrigger that is enabled. When you interact with the BgValve (ActivateTrigger) again, the car stops and the TimerTrigger stops too. (EnableTrigger and DisableTrigger for the TimerTrigger should work) So all I need right now is make the TimerTrigger update the BgText marker, so BgText marker shows how many seconds are left in the TimerTrigger, or in this case: fuel.
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Thu Nov 22, 2018 7:10 pm

Ol1vver wrote:
Thu Nov 22, 2018 6:51 pm
JakSparro98 wrote:
Thu Nov 22, 2018 3:52 pm

If you want a script-free solution, well, you are in the wrong place, my friend.

For a script request, instead, just provide more information of how this mechanic should work and I'll be glad to help.
I have made a car and a fuel meter. I want to make it so, when you interact with the BgValve (ActivateTrigger), the cars starts moving and there's a TimerTrigger that is enabled. When you interact with the BgValve (ActivateTrigger) again, the car stops and the TimerTrigger stops too. (EnableTrigger and DisableTrigger for the TimerTrigger should work) So all I need right now is make the TimerTrigger update the BgText marker, so BgText marker shows how many seconds are left in the TimerTrigger, or in this case: fuel.
I will elaborate the request in a couple of days, then I will post the code and a template map, if necessary.
0 x

User avatar
Ol1vver
Superfighter
Superfighter
Posts: 69
Joined: Mon Nov 19, 2018 4:55 pm
SFD Account: olv
SFD Alias: olv
Started SFD: PreAlpha 1.6.4
Gender:

Post by Ol1vver » Thu Nov 22, 2018 7:41 pm

JakSparro98 wrote:
Thu Nov 22, 2018 7:10 pm
Ol1vver wrote:
Thu Nov 22, 2018 6:51 pm
JakSparro98 wrote:
Thu Nov 22, 2018 3:52 pm

If you want a script-free solution, well, you are in the wrong place, my friend.

For a script request, instead, just provide more information of how this mechanic should work and I'll be glad to help.
I have made a car and a fuel meter. I want to make it so, when you interact with the BgValve (ActivateTrigger), the cars starts moving and there's a TimerTrigger that is enabled. When you interact with the BgValve (ActivateTrigger) again, the car stops and the TimerTrigger stops too. (EnableTrigger and DisableTrigger for the TimerTrigger should work) So all I need right now is make the TimerTrigger update the BgText marker, so BgText marker shows how many seconds are left in the TimerTrigger, or in this case: fuel.
I will elaborate the request in a couple of days, then I will post the code and a template map, if necessary.
Yeah, I would like a template, or I won't be able to understand how to use it. Thanks!
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Sat Nov 24, 2018 8:11 pm

Script done, I hope is what you wanted @Ol1vver
Map template
Let me know if you need help figuring out how the script works.
1 x

User avatar
Ol1vver
Superfighter
Superfighter
Posts: 69
Joined: Mon Nov 19, 2018 4:55 pm
SFD Account: olv
SFD Alias: olv
Started SFD: PreAlpha 1.6.4
Gender:

Post by Ol1vver » Tue Nov 27, 2018 2:30 pm

JakSparro98 wrote:
Sat Nov 24, 2018 8:11 pm
Script done, I hope is what you wanted Ol1vver
Map template
Let me know if you need help figuring out how the script works.
Thanks, but I really didn't need the car. All I needed was the timer in milliseconds. But ok, I guess?
0 x

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Tue Dec 25, 2018 2:31 pm

 ! Message from: JakSparro98
The requester has afterwards marked this other solution as the one he was looking for.
0 x

Post Reply