how to make appear in the game only those obj whi

Get help using Construct 2

Post » Tue Mar 27, 2012 8:27 am

how to make, appear in the game only those objects which you have chosen in inventory
B
6
S
1
G
1
Posts: 41
Reputation: 911

Post » Tue Mar 27, 2012 9:16 am

maybe you should explain more... i can't understand what you want to ask. maybe post your capx here.farsmile902012-03-27 09:17:04
B
50
S
12
G
7
Posts: 259
Reputation: 10,371

Post » Tue Mar 27, 2012 9:20 am

B
6
S
1
G
1
Posts: 41
Reputation: 911

Post » Tue Mar 27, 2012 9:23 am

oh sorry it is not him
B
6
S
1
G
1
Posts: 41
Reputation: 911

Post » Tue Mar 27, 2012 11:18 am

If you mean that only inventory objects should be visible, maybe something like this:

Event:
mySprite->Is boolean instance variable set (isInventory)

   Action: mySprite->Set visibility (Visible)


Event:
mySprite->(NOT)Is boolean instance variable set (isInventory)

   Action: mySprite->Set visibility (Invisible)

If you mean to highlight the Inventory objects (that perhaps you can move around, like in Electric Box 2 (space key) or Chessnut (Flashlight function) ), that's a bit more complicated, I can show you how I did it if that's what you mean, just let me know, write @Geo in your reply here and I'll post a simple capx.
B
14
S
5
G
7
Posts: 235
Reputation: 5,175

Post » Tue Mar 27, 2012 11:20 am

thanks,i will try right now
B
6
S
1
G
1
Posts: 41
Reputation: 911

Post » Tue Mar 27, 2012 11:37 am

See this. It's a inventory-kind-of i made.
I think is a lot similar on what you need.
B
15
S
5
G
1
Posts: 40
Reputation: 2,026

Post » Tue Mar 27, 2012 11:40 am

Well, similar to what I want, right now, try to do this
B
6
S
1
G
1
Posts: 41
Reputation: 911

Post » Tue Mar 27, 2012 11:42 am

You can change a little bit, I do not fully understand?
B
6
S
1
G
1
Posts: 41
Reputation: 911

Post » Tue Mar 27, 2012 11:55 am

I don't understand what do you need... try to explain it better.
So anyone can help you ^^

However the capx i posted is quite simple.

Look at the InventorySheet.
It just set a global var on mouse events:
- to 1 if the object it's selected (with left click) in inventory layout. (It also change the animation to "Selected" to show the sprite orange)
- to 0 if the object it's not selected (with right click) in invetory layout. (It also change the object animation to "Default" to show the sprite green)

On start of game layout, gameSheet checks the global var: if it's 0 it destroy the sprite, else it just modify it's position to what you want.

Going back to invetory layout, InventorySheet checks the global var: if it's 0 it set the animation "Default" (i.e. not selected - green), else it set the animation "Selected" (i.e. selected - orange).

Dado2012-03-27 12:08:01
B
15
S
5
G
1
Posts: 40
Reputation: 2,026

Next

Return to How do I....?

Who is online

Users browsing this forum: h1k3, Unconnected and 0 guests