-
Member
Reset impulse after disable?
Was suggested that I try this forum to get help.
So here's a copy/paste from the Steam forums.
So... I got a bomb strapped to the character, it starts counting down once the player hits an Area Trigger.
When the player reaches a checkpoint, the bomb "defuses". The checkpoint simply disables a few Impulse Triggers
Problem is, the next Area Trigger to rearm the bomb makes the Impulse Triggers resume where they left off. I'd like them to start counting from zero again.
The Impulse Triggers got an option called: "Reset When Enabled"
But that makes everything fire off as soon as the player hit's the trigger (Making the bomb explode instantly.
http://i.imgur.com/G7iZhA6.jpg
I know it's a bit of a cluster f*** to look at. There's a few things I could move around and merge.
But whatever 
The Area Trigger triggers a sound and makes a light flash.
After 15sec it makes another sound fire on a loop.
All of that is set on X amount of impulses to stop them after 20sec.
20sec in, it hides the "dummy-explosive" and breaks the real one (Since I can't make it break the "dummy-explosive" as it's a glued object.)
And as I said above, the checkpoint simply turns off the Impluse Triggers.
The next Area Trigger makes it continue where it left off (Which is the problem).
I'm completely lost on how to reset it all once the checkpoint trigger. I'd love some help
-
Member
I think you got it real close to what you want it to do. From what I see in the picture though, you're missing a "Set Value Event" to replace/set the timer on the explosive. It's used in junction with the value data source triggered by the checkpoint.
If this isn't right, I'm sure a brilliant Editor magician will have a fix for you to try. My skill line is Dukt-Taping until it works.
-
Senior Member
Like RidingMower said, it would be easier with value events. I would do something like in the picture. It's not the complete setup you have but I think it's clear what the setup does. So I assume you can figure out what I did. If not, and you are on pc, I can always make you a favorite from it so you can just import it in your game and check it out there. Or just ask here if you want me to explain something.
https://gyazo.com/1c26f3830b1aa343fec19e4f53961acd
-
Senior Member
Is there any reason you can't use a Physics Joint?
Ditch all that OPE positioning code and attach the the explosive backpack to the rider using a Physics Joint. Then you can activate it with a Break Event.
[Explosive]
Physics: Yes
Mass: 0.100
Hitpoints: 0
Physics Type: No Contact
[Physics Joint]
Type: Point to Point
Target1: Rider's back
Target2: Explosive
Replace all of the Interval Triggers not used for sounds with a Curve Data Source.
[Curve Data Source]
State: OFF
Type: Linear
Start: (Fuse delay x 60) (15 seconds = 1200)
End: 0
Duration: (Fuse delay)
Reset on Disable: Yes
[Checkpoint]
[State Event:OFF] > [Curved Data Source]
[Area Trigger]
[State Event:ON] > [Curve Data Source]
[Interval Trigger]
Delay: 1 tick
Target: Generic Filter
[Generic Filter]
Type: Equals
Target1: (Curve)
Target2: 0
TRUE > [Break Event]