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.

Reset Trigger

Here you can find ScriptAPI suggestions implemented in the game.
Forum rules
By using the forum you agree to the following rules.
Locked
User avatar
Jovani
Fighter
Fighter
Posts: 55
Joined: Sun Sep 18, 2016 2:49 am
Title: Heroe
SFD Account: Jovani
SFD Alias: Johnny
Started SFD: 2014
Location: Mexico
Gender:

Reset Trigger

Post by Jovani » Sun Mar 15, 2020 11:58 pm

Image
"Reset Trigger" is an trigger used to reset the time from "Time Trigger" to 0 and also to reset "Alternating Trigger" making it activate from beginning.
This occurred to me because I was trying (in map editor) that when player leaves an "Area Trigger", "Time Trigger" time is reset to 0 again without activating anything through "Disable Trigger", but it didn't work, it only stopped time but doesn't leave back to 0.
Image
This trigger can helps to reset "Time Trigger" time and "Alternating Trigger" activation order when player (on your map) performs an action that causes these triggers to reset.
Image
1 x
-I hope one day to have green ping on most servers...
-SFD is a good game that inspired people to make friends, be artists and "YouTubers". I hope one day SFD becomes famous and everyone recognizes it.

User avatar
NTN9
Fighter
Fighter
Posts: 50
Joined: Sun Mar 27, 2016 7:16 pm
Title: Who am I?
SFD Alias: NTN9
Started SFD: PreAlpha 1.6.2
Location: Where am I?
Gender:
Age: 22
Contact:

Post by NTN9 » Mon Mar 16, 2020 3:58 pm

Neat idea, but right now you can do that by spawning Timer and DestroyTrigger in group:
https://drive.google.com/file/d/1hL5hX0 ... sp=sharing


Image
0 x

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1884
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » Sat Mar 21, 2020 7:29 pm

Added the following after v.1.3.4:
Added IObjectTimerTrigger.ResetTrigger(), IObjectTimerTrigger.StopTimer(), IObjectTimerTrigger.StartTimer(), IObjectTimerTrigger.IsTimerRunning to be able to stop/start/reset timers through code.
Added IObjectAlternatingTrigger.ResetTrigger() to be able to reset AlternatingTriggers so it starts all over again.

No ResetTrigger though as not many triggers can/may reset so it's not a generic/common enough use-case. But the ScriptAPI functions might help in certain cases.
0 x
Gurt

Locked