How to set Default Values for Vectors in Custom Event?

Hello everybody,

just a short question: If I create a custom event, and I want to give my input parameters some default values, I can do that in the details section. Or at least I can do it for integers, floats and boolean variables, by typing “1”, “1.0” or “true” in the “Default Value” field.

But how can I assign default values for other parameter types? Like vectors or linear colors? I tried a few different ways, but everyting I type in instantly gets deleted… Do I have to use a specific syntax?

How to set a default value?

Thanks for your help!!

You can set the default value by setting values separated by commas…

For example a vector…

32.0, 32.0, 32.0

Hope that helps =)

D’oh -.-" Seriously? I tried semikolons and blanks…

Thanks buddy ^^

No problem!

If you would accept the answer and/or upvote, I would appreciate the karma =)
Enjoy your Gamedev!

Oooh… so that’s how this system works! Thanks a second time for clearing up this mystery! :smiley:

No problem, but once you make another comment, it unaccepts the answer, so you need to accept it again… thanks! =)

could you do it for color? and how ? because this doesn’t work for me.

The comma-separated solution works for built in (3D) vectors, but apparently not for the built-in (but defined as a struct) Vector2D. There I had to set the default values as:

(x=1,y=1)

Both the parentheses and the x= and y= are important.

Also it seems, once you set a default value, you can’t clear it any more, you have to enter something. Maybe this has to do with undefined behaviour for already instanced functions. One way to clear the value for a Vector2D is to use ().

I was looking around to see how to set default colors, this was the closest I found, but it worked!

For those interested, its:

(r=1,g=1,b=1)

I’m sure you can add a “a=1” at the end if needed. What I was using it for didn’t use alpha

And how to do it with arrays? (Like boolean array)