Is there a way to make a function "assume" a parameter?

I have a function thats going to be used a LOT of times within my game, but if I need to add a new or change an object/parameter, I need to manually do it to every instance already present, as the object needs to be in the parameters.

Is there a way to make the function “assume” a parameter and apply it automatically to every instance and without needing a list of parameters at the end for the objects? If so, I could cut off the 8+ parameters off the end of the string.

What are you trying to do? What are the objects. The more info the better.

The short answer is no. Not for objects. You might be able to do it with Javascript but I wouldn’t recommend it.

You might be able to create a behavior(s) or a custom (prefab) object or use the same object but change the animations.

I have an “ending” system where objects like an overlay, different text objects, and some buttons appear every time its triggered. The only parameters that actually have to be different for each ending are what the text objects say, as everything else is the same across every instance of the function.

Can you post an image of the objects?

If the objects didn’t move. I’d suggest a custom object. A group or maybe an external layout. Maybe with linking.

An object variable or object name could identify which object gets which text. You could pass the group as 1 prompt instead of seperate objects.

I still don’t really understand the setup.

As you can see, almost all of the parameters are objects. The only 3 parameters that would be different per ending are EndingID, TopLabel, and BottomLabel. Every other thing is the same, and the only moving objects are the two buttons (and there will be at least two more added in the near future)

I’m not aware of a way to make a parameter optional or set a default value for objects. You can do it with a value like a number but not for objects. It needs a reference to the object’s unless it was hard coded some way. Maybe set the values with 1 function and then update the objects with another. IDK. I’m just thinking outloud.

If it was a custom (prefab) object then the objects wouldn’t need to be parameters.

Otherwise, the easiest solution might be to copy and paste the event.

Behaviors might be another option although, they’d need to communicate with each other.

Custom objects indeed sounds like a good fit: