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.

#1 06-12-2018 11:29:36

spook1
Membre
Inscription : 12-02-2018

create effect loop, how to adress properties of _dragged? ✓

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

#2 04-01-2019 08:55:52

jawa
Admin

Re : create effect loop, how to adress properties of _dragged? &check;

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

#3 04-01-2019 13:34:11

spook1
Membre
Inscription : 12-02-2018

Re : create effect loop, how to adress properties of _dragged? &check;

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

#4 05-01-2019 17:10:13

jawa
Admin

Re : create effect loop, how to adress properties of _dragged? &check;

it's probably because the generic id 1 & 2 is a feature I added after the first version of your card puzzle !

Pied de page des forums