If you just need to turn on/off something, you can simply create the OnToggle function in your class that needs to be modified by kismet with the already implemented Toggle kismet action, like this :
Code:
class YourClass extends AnotherClass;
// ...
function SetEnabled(bool Enable) {
bEnabled = Enable;
if (Enable)
// turn features on (changing a boolean value, changing state, ...)
else
// turn features off (changing a boolean value, changing state, ...)
}
function OnToggle(SeqAct_Toggle Action) {
if (Action.InputLinks[0].bHasImpulse)
SetEnabled(true);
else if (Action.InputLinks[1].bHasImpulse)
SetEnabled(false);
else if (Action.InputLinks[2].bHasImpulse)
SetEnabled(!bEnabled);
}
// ...
If it is not sufficient, you can create your own SequenceAction for Kismet, so this action will be able to do what you want with any object you want in Unrealscript. It will only need to have a reference to the object that you want to affect.
Bookmarks