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 29-03-2019 21:39:05

spook1
Membre
Inscription : 12-02-2018

activate a group of objects

I am trying to activate a group of objects. It works more or less.

Only when I activate an object, that activates a script, nothing happens.

My new testgame is #2239

I have three cards, in a group cards

The group is activated when GET IN a scene

The cards have each a different action in the  ANY ACTION of the player interaction.

Card A                           updateobject:3:x:100:1                                              works fine

Card B                            updateobject:3:x:[100*{{_custom1_3}}]:1                works fine

Card C                            activate:30136             
                                     30136 =  script: layout C:  updateobject:3:x:100:1       does not do anything

                    Another attempt with different script:

                                                    script layout_C:  updateobject:1:x:100:1       moves card only after manually clicking it


Can you tell me what I am doing wrong?

Or is this one of the occasions you mentioned where the id:3 is not yet implemented ?

Hors ligne

#2 30-03-2019 13:19:46

jawa
Admin

Re : activate a group of objects

Okay it's because genericd id refers to the "self" object
So in the script interaction id 3 refers to the script object itself, which has no visual representation.

However Id 1 should work and stand for each object, even triggerred through a group. I'll check that. Does it have the same behavior when you trigger card c directly ?


A workaround could be to set a variable with the object id in the object interaction ans use this variable in the script.

Z

#3 03-04-2019 10:17:29

spook1
Membre
Inscription : 12-02-2018

Re : activate a group of objects

same result when When Object C is activated on scene entrance

Get in scene:  activate:30137

{ the player activates the object card_C }

Now also card_C only moves when it is manually triggered.

(game #2293)

Hors ligne

Pied de page des forums