The Daily Click ::. Forums ::. Klik Coding Help ::. Object groups and alterable values
 

Post Reply  Post Oekaki 
 

Posted By Message

Ecstazy



Registered
  04/01/2002
Points
  179

VIP Member
9th April, 2009 at 18:55:13 -

Hey there
I lately find myself dealing a lot with several objects tied together in a group. It's usually peachy, but I have a problem when it comes to alterable values, for example I try to do this:

* CursorObject overlaps Group.0
* Player clicks with left mouse button
= Add 1 to Alterable Value A("Group.0")

* Alterable Value A("Group.0") = 1
= Do stuff

And it works really great....on one object, which I can't determine why it was the one that was picked to be the lucky one. Other objects just turn bad and apparently don't get the value updated with them specifically. That happens whenever I try to do events with object groups and alterable values.

Is there any way to make an event concerning groups apply a value to the specific object the event is relevant to?
I tried replacing alterable values with counters, but that effects all the objects.
I was also desperate and started thinking of maybe somehow retrieving the selected object's name, saving it into a string and then applying it in events, but I couldn't find any extension that has a "Get Object Name" action.

 
Amongst Strangers
http://www.create-games.com/project.asp?id=1445

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
9th April, 2009 at 19:24:55 -

Try changing
* CursorObject overlaps Group.0
to
* Group.0 overlaps CursorObject

Keep the rest the same.
Let me know if it works.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
9th April, 2009 at 19:33:30 -

Klikmaster is right - the order in which you build your conditions is important (see the article "Handling Duplicates" for a more thorough explanation).

Having said that, the example provided seems to work perfectly for me, exactly as it is already.

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
9th April, 2009 at 19:36:44 -

I haven't got mmf here to confirm the problem or solution but it sounds like an event/condition ordering problem.

 
n/a

Ecstazy



Registered
  04/01/2002
Points
  179

VIP Member
11th April, 2009 at 11:40:14 -

I tried what you said and no success.
What can I say to help you out?

By the way I tried remaking the events with counters instead of alterable values, but this time also referencing the group with a condition unique to the selected object alone, but now it just doesn't respond to any object at all.

Edited by Ecstazy

 
Amongst Strangers
http://www.create-games.com/project.asp?id=1445

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
11th April, 2009 at 13:12:48 -

I have replicated your original question in mmf and it works fine.

Are there any other events that could be interfering?

 
n/a

Ecstazy



Registered
  04/01/2002
Points
  179

VIP Member
11th April, 2009 at 15:51:18 -

There aren't other events, I'm just using 3 test actives.
Here's the full story: I'm trying to make the cursor's object teleport other teleportable object (defined as group 9). When you select an object it starts fading, and once you click another position and the object fades out completely, it repositions there. If you haven't clicked any other location then after the fading out it returns to normal.

This is the first version (also tried that one after changing the events order as you said):
http://solid.flam.free.fr/files/strangers/objgroup_v1.png
In this version it only works on one group 9 object.

This is the second version, I simply replaced the group's alterabl values A-C with the cursor object's alterable values D-F:
http://solid.flam.free.fr/files/strangers/objgroup_v2.png
This way it doesn't work at all, but if I remove one of the conditions in event #27, it makes all group objects fade out and reposition.

Sorry also for the large amount of alterable values, I was never the efficiency expert.

Edited by Ecstazy

 
Amongst Strangers
http://www.create-games.com/project.asp?id=1445
   

Post Reply



 



Advertisement

Worth A Click