Refer to object parameters in Actions

Hello Everyone.

I might have a missed a wiki page here or something, but I am looking for a way to change or point to some parameters of an object in the Event manager.

Exemple, I found to point to the position of an object(named say exemple) coordinate, I can write exemple.X().

Can I do that with every object in the scene?
Can I do that with behaviors parameters?
Is there a way to find out how to find the parameters name?

As I said, if documentation is available for that, please point it to me, I will do my reading before bugging the forum for easy answers.

Thanks a lot!

I don’t understand what are you want.
you can refer multiple objects if they are in the same object group. if you want work with all object in the scene, you need to create a new object group, and assign every objects to it. but I think it isn’t any sense to refer all objects X coordinate at the same time. but if you want to do it one by one, you should use the “for each” event type together with the object group.

Search on wiki “function reference” :wink:
For custom behaviors parameters i don’t remember if it’s possible in classic eventsheet.
I know how it’s possible to get parameters inside a fonction or behavior. Maybe outside it’s same way.
try
GetArgumentAsNumber(“nameProperty”)
GetArgumentAsString(“nameProperty”)

Ah! That is fantastic.
Will test those today.
Thanks!

To be more specific, this morning I wanted to create an object using the mouse at a certain position in the scene and I wanted to use the coordinate of the whole canvas, which was 600 * 4000. It worked using mouse.X() and mouse.Y() but only in a still frame. If the camera is moved, the coordinates of the mouse do not work anymore, so I wanted to use the coordinate of the whole scene canvas.

Would that be possible?

Maybe I should not look at it this way…

oh. I understand this. I don’t know the mouse poiner coordinate is relative to the camera. but it makes sense. I don’t know is there a way to make it absolute (relative to the scene), but if it isn’t you should use math to add or substract the size and the position of your camera to your mouse’s coordinates.

I did not have the time to run in the debugger to see what exact coordinates are registered when you move the camera. But it is way off where the mouse cursor was shown on the screen.

Adding the camera position to mouse cursor position was my first instinc too, but i thought that there was maybe also some sort of “master” scene coordinate you could point to as well and avoid some calculation.

I will try to work something out tonight!

I do not know your level of interest of this thread, but I just found out that the problem might be a layer thing… I just got rid of every useless things in the scene (beside the marker and the player) and the camera follow perfectly, target stays in place.

Will try later to build upon that. But so far this is making what I had in mind in the first place. Seems like when a background image is in the mix everything goes wrong.

1 Like