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.

Button counter on triggers

Share questions and tutorials related to the map editor. Share you maps in the Superfighters Deluxe Custom Maps section.
Forum rules
By using the forum you agree to the following rules.
Post Reply
Hyrin
Meatbag
Posts: 5
Joined: Fri Dec 08, 2017 3:05 pm

Button counter on triggers

Post by Hyrin » Fri Jul 12, 2019 5:36 pm

Hello, is it possible in the Map Editor to do something like a button presses counter, or some kind of switchable trigger. Not using Script API.
https://ibb.co/bs3cT0P
Second pressing the button should activate the right-most RevoluteJointValueTrigger which stops the rotation of the gun
Sorry my english, im is Russia
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 » Fri Jul 12, 2019 5:41 pm

There is a type of trigger that enables and disables other triggers. With a creative way of hooking such triggers together you can create doors that can only be closed by one button and opened by another - all using triggers.
The buttons also have properties which allows you to only use them once or have a longer cooldown between presses.
0 x
Gurt

Hyrin
Meatbag
Posts: 5
Joined: Fri Dec 08, 2017 3:05 pm

Post by Hyrin » Fri Jul 12, 2019 10:27 pm

https://ibb.co/55HzT3w
So I made the switch button off. But for some reason, if I duplicate the whole mechanism and connect it to another RevoluteJoint, it does not work as a switchable button.
P.S.
Of the three mechanisms, only one works, I cannot understand why. The remaining two non-dedicated mechanisms allow you to open the gateway in the front of the ship, and launch the ElevatorPathJoint, but do not allow to stop by pressing the button again.
https://ibb.co/Tv26n1v
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 Jul 13, 2019 12:27 pm

For a toggle-door that can be opened/closed from a set of buttons you can use the AlternatingTrigger. All buttons that should be able to toggle the door should activate the AlternatingTrigger. That AlternatingTrigger should point to all the RevoluteJointValueTriggers that you want to cycle in order. One for opening, one for closing.

Copying a complex sequence of triggers may not include all the properties you may expect, depending on what you have selected. You need to verify all the connections once you have copied a bunch of triggers.
0 x
Gurt

Hyrin
Meatbag
Posts: 5
Joined: Fri Dec 08, 2017 3:05 pm

Post by Hyrin » Sat Jul 13, 2019 4:01 pm

Thank you very much
0 x

Post Reply