Equip item

Get help using Construct 2

Post » Wed Jun 12, 2013 11:56 pm

Hi.

I want an npc to give the player a sword that can be drawn or sheathed by right clicking a button on the HUD.

This




sort of works, in that clicking the button changes the button image and changes the player frame.





But adding this bit:




stops the button working at all.




Does anybody know what's up?

(Thank you.)
B
13
S
1
Posts: 68
Reputation: 1,198

Post » Wed Jun 12, 2013 11:58 pm

Try adding Sprite11 Is Visible to event 19 and Claiomh Is Visible to event 18
B
47
S
14
G
7
Posts: 603
Reputation: 8,141

Post » Thu Jun 13, 2013 12:28 am

Or don't use 2 sprites. Just use one. Key it off the frame or animation instead of which sprite you clicked.
B
31
S
10
G
7
Posts: 416
Reputation: 7,264

Post » Thu Jun 13, 2013 12:52 am

Thanks Folks.

EncryptedCow:
Like this?


(It doesn't work that way.)

firebelly:
Thanks, that's what I started off with, but I was having the same problem. Separate sprites was me trying to work around the problem instead of fixing it. I'll set it back to that way, and post an image of the Event sheet as I had it. Sprites, frames or animations: I'll be happy with anything that works.
B
13
S
1
Posts: 68
Reputation: 1,198

Post » Thu Jun 13, 2013 1:41 am

I deleted Sprite11 and imported the graphic as "animation2" in Claomh
Now it looks like this:



(It doesn't work this way.)Hansokumake2013-06-13 01:42:02
B
13
S
1
Posts: 68
Reputation: 1,198

Post » Thu Jun 13, 2013 9:10 am

hi, i created a little example, using a boolean variable
hope it helps

set weapon active

example
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Thu Jun 13, 2013 11:26 am

Thank you so much!

I'll try that as soon as I get home.
B
13
S
1
Posts: 68
Reputation: 1,198

Post » Thu Jun 13, 2013 3:56 pm

Hi

There are these two tutorials here which I'm currently using:
1)
2)

Also there are a lot more tutorials that exist as well, I've seen one to do with the animation or 'swooshing' if you like of a sword. Just search around and it'll be found.
B
20
S
7
G
4
Posts: 322
Reputation: 4,521

Post » Sat Jun 15, 2013 4:18 pm

Thank you Sulli!
B
13
S
1
Posts: 68
Reputation: 1,198


Return to How do I....?

Who is online

Users browsing this forum: ratboy3, Yahoo [Bot] and 42 guests