How do I attach something to a sprite? and......

Get help using Construct 2

Post » Mon Dec 28, 2015 3:49 am

I want to attach the sprite titled "FistOfFire" to the sprite "Monster" in the animation called "Attack" frame 2.

Here is the project:
https://www.dropbox.com/s/vgotgkbyl6osj ... aproj?dl=0

If your feeling generous maybe you could:
1 Show me how to crouch.
2 When crouching shrink the Playerbox and goes back to normal upon standing
3. Attack when crouching

If there is a tutorial covering all this please let me know.

Thanks for any help at all
B
24
S
7
G
3
Posts: 122
Reputation: 3,047

Post » Mon Dec 28, 2015 3:58 am

1. Crouch - on button press, set animation to crouch - internal pain app. and animation tabs are accesed by double clicking on sprite and there will be a small tab with animations. Right click there to add a new animation, and at the bottom there will be another tab with frames.

2. Player hitboxes - these are set in the internal paint app, again by double clicking on sprite. If you want a smaller hitbox on crouch, you just need to go to that animation frame/frames and set the hitbox smaller there.

3. You need to make a variable checking if player is crouching: make variable, turn it on while player is crouching, and if that variable is turned on, it means he is crouching and during the time that variable is on, on key press attack ---> play animation crouch attack. On button crouch not pressed anymore turn crouching variable off.

To attach something to a sprite look for the pin to behaviour.
Brick by brick, stone by stone.
B
51
S
23
G
15
Posts: 273
Reputation: 11,538

Post » Tue Dec 29, 2015 8:09 am

Thank you
B
24
S
7
G
3
Posts: 122
Reputation: 3,047

Post » Thu Jul 14, 2016 5:24 am

Sorry, but I unfortunately stopped on this project and just jumped back in.
I've been attempting what you're saying for the past hour and cannot get it right.
Do you mind showing me?

I am only speaking in regards to the "Crouch Attack" animation. I cannot get him to do that animation while holding the "Crouch" button.

Everything else worked just fine.

https://www.dropbox.com/s/hsf7i5kgxx6lg ... .capx?dl=0
B
24
S
7
G
3
Posts: 122
Reputation: 3,047

Post » Thu Jul 14, 2016 5:43 am

You've got conflicting events. If S is down, you are resetting to Crouch (event 6). If comma is pressed you do Attack at event 19 and but also CrouchAttack at 29. You need to account for the multiple conditions for the various states.
ImageImageImage
B
71
S
20
G
191
Posts: 3,535
Reputation: 108,844

Post » Thu Jul 14, 2016 7:07 am

blackhornet wrote:You've got conflicting events. If S is down, you are resetting to Crouch (event 6). If comma is pressed you do Attack at event 19 and but also CrouchAttack at 29. You need to account for the multiple conditions for the various states.


Sorry, but I don't notice what you are saying. CrouchAttack is not listed on event 29.
The only CrouchAttack I have listed is at event 3, but it's not even activated.
B
24
S
7
G
3
Posts: 122
Reputation: 3,047

Post » Thu Jul 14, 2016 9:24 am

MAVERICK wrote:
blackhornet wrote:You've got conflicting events. If S is down, you are resetting to Crouch (event 6). If comma is pressed you do Attack at event 19 and but also CrouchAttack at 29. You need to account for the multiple conditions for the various states.


Sorry, but I don't notice what you are saying. CrouchAttack is not listed on event 29.
The only CrouchAttack I have listed is at event 3, but it's not even activated.


Perhaps your download link is older than the current build version you're working on, or something?

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
62
S
24
G
39
Posts: 2,963
Reputation: 28,311

Post » Thu Jul 14, 2016 1:26 pm

I wasn't going to post this since your CAPX opens with missing images. But I quickly hacked a few changes at events: 6, 19, 26-29

http://www.blackhornettechnologies.com/ ... e_BHT.capx
ImageImageImage
B
71
S
20
G
191
Posts: 3,535
Reputation: 108,844

Post » Wed Jul 20, 2016 6:56 am

Thanks for your help thus far, but I'm still not getting it. :evil:
I have tried implementing what you suggested and for some reason I cannot see what I am doing wrong. :oops:
Do you mind taking a look at what it is I've not picked up on?

Here is the latest build:
https://www.dropbox.com/s/yqtg0whg3awpx ... .capx?dl=0
B
24
S
7
G
3
Posts: 122
Reputation: 3,047

Post » Wed Jul 20, 2016 8:48 am

Everytime i open 1 of those projects C2 goes in an endless loop, complaining about missing animation frames.

You should completely redo the blood animation, delete and add them again.

But then, when i got trough the blood miserie, i see none of blackhornet's suggestions in your last build.
Even though, that character could standup in a narrow cave from crouch, but thats a easy fix with a 'overlapping at offset'. He only fixed the aimations, but i see none of the fixes ?
B
28
S
16
G
23
Posts: 2,117
Reputation: 17,375

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests