Vous n'êtes pas identifié(e). Pour pouvoir écrire ou répondre à un message, vous devez vous connecter ou vous créer un compte sur JAWA.
Pages : 1
In a sorting game I would like to get the id of an object htat is being interacted with.
I have card that moves to a target.
I would like to do something like:
updateobject:1:x:{{_x_combined_with}}:1
To move the card exaclty over the target.
I would also like to be able to compare custom variables, like:
custom_1_1 = {{_custom1_combined_with}}
Does anyone know the syntaxes for this?
Dernière modification par spook1 (25-11-2018 13:13:27)
Hors ligne
Hi Martijn,
An elegant solution you cpould try put a positionning "step" on your movable cards object, meaning your objects will auto align on an invisible grid, so if your cards are placed on that grid to this will achieve the effects. The only problem is that the same step applies to x and y coordinates, so the virtual positionning grid is based on square cells.
If not convenient, an "ugly" workaround solution you can use now is to store in some variable the combined object coordinates, on each combine interaction.
for instance :
in the "A combined to B interaction" effects you store
variable:x_target:{{_x_<id of B>}}
variable:y_target:{{_y_<id of B>}}
and in your positionning script :
update:1:x:{{x_target}}
update:1:y:{{y_target}}
This impllies that you create a combine interaction to set the coordinates on each target object..
but in the next version, you'll be able to use the generic id_number "2" in object variables to point to the combined object
So the syntax will be :
updateobject:1:x:{{_x_2}}:1
And you will no longer need to duplicate interactions.
(Currently, I'm working on group interactions and a lot of things like that will be much easier)
Z
Thanks, i will wait with tutorials untill the new version is life
Hors ligne
its very "beta test" but you can try that now.
It works a little bit. There seems to be a bug...
When I set interaction with object 2 =any-object,
and I script:
variable:other_ID:{{_custom_1_2}}
to set my variable "other_ID" to get the value of custom1 of object 2
I get an error:
variable _custom_1_26052 n'existe pas. Utilisez le vérificateur de jeu pour corriger cette erreur
See game 1846, the script is in test_element.
When test element interacts with any other obejct the error pops up.
Hors ligne
warning, the correct syntax for custom variables is :
{{_custom1_xxx}} (without the "_" betwwen custom and the number)
ahh, of course. excuse me..
Hors ligne
Pages : 1