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.
This is not an urgent question,
but it would be nice to add some effects to a cardgame.
For isntance, I want a card to shrink, after it is clicked.
For that i am creating a scipt called: effect
It contains the followinglines, that both do not work..
updateobject:{{_dragged}}:w:[_w_{{dragged}}*0.95]:0
updateobject:{{_dragged}}:h:[{{_h_dragged}}*0.95]:0
The editor does not isuue an erro, but it does not function.
I also added a line for rotation, and works fine:
updateobject:{{_dragged}}:rotation:[{{EFFECT_I}}*5]:0
The whole script is:
If Effect_I < 50 then:
updateobject:{{_dragged}}:rotation:[{{EFFECT_I}}*5]:0
updateobject:{{_dragged}}:w:[_w_{{dragged}}*0.95]:0
updateobject:{{_dragged}}:h:[{{_h_dragged}}*0.95]:0
pause:0.05
variable:EFFECT_I:+1
activate:26432 // which is the script "effect"
Hors ligne
not sure to understand what you want to do but have you tried using the generic object ID "1" in your effects ? (id 1 stands for the last triggered or dragged object)
updateobject:1:w:[{{_w_1}}*0.95]:0
updateobject:1:h:[{{_h_1}}*0.95]:0
JAWA does not support imbricated variable expressions, so an expression like
{{_something_{{something_else}} }}
will always fail
Thank you for explaining. I have used the _dragged once to "remeber" the last memorycard touched. Did not realize that :1 does the same, when I do not need the explicit ID.
Hors ligne
it's probably because the generic id 1 & 2 is a feature I added after the first version of your card puzzle !