How do I make my game picking up 2 UID?

Get help using Construct 2

Post » Thu Jan 08, 2015 5:28 pm

I want to pick armor, then pick body and pin it but I dont know how (there are many bodies and armors)
B
6
Posts: 56
Reputation: 366

Post » Thu Jan 08, 2015 7:02 pm

If these armors & bodies are already exist in layout, You can just retrieve their UID values. But alternatively You can use IID which order based on objects creation at runtime.

To pin certain armor into certain body, create an instance variable or local variable first then store the UID/IID into.
ImageImage
B
108
S
49
G
23
Posts: 783
Reputation: 22,611

Post » Fri Jan 09, 2015 8:29 pm

I already stored my UID in it, but what next (how to pin this object by UID)?
B
6
Posts: 56
Reputation: 366

Post » Fri Jan 09, 2015 8:40 pm

On Whatever you do to Equip Armour
Pick Body by Unique ID
- Armour: Set Position to Body at Image Point X
- Armour Pin to Body

Does that work?
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Fri Jan 09, 2015 8:44 pm

But I want to take 2 UID like:
-Pick X by Unique ID
-Pick Y by Unique ID
-Pin X to Y
B
6
Posts: 56
Reputation: 366

Post » Sat Jan 10, 2015 4:02 am

would go a lot better if i could see your code, I dont know how you're setting the whole process up so it can happen in a hundred different ways -- me saying one way might go completely against what you're doing in your code already. Be sure to tag me (@80bit) in your response so i get notified.
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020

Post » Sat Jan 10, 2015 4:51 am

If there are many item X's and many item Y's, and you want to choose one of each, and pin them together, C2 can't guess that for you :) and neither can we. It's up to your logic to work that out. IF I've understood what you're asking.

If you DO know which item X and item Y you want to choose, then you CAN pick each one by UID, then pin them.

If they are BOTH the same object type (i.e. BOTH item X or BOTH item Y)then you can use a Family to pick.

Does any of these fit what you're asking?

edit: see if this helps. Here I'm using drag-drop to choose objects but you could use anything.
pin_armor_body.capx


edit: this one might be closer to what you're asking
pin_armor_body_2.capx
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 44 guests