How do I make it work again?

Get help using Construct 2

Post » Thu Dec 07, 2017 6:00 am

Message: max2612 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Hi all

I made a game of Japanese Spelling. Last night when I tried to do spelling by comparing two texts, it worked. But when I tried it again this morning, it doesn't work now. And now I'm super confuse.

Here is the .capx

https://drive.google.com/open?id=1y8UHzwP5kOIPLxHGQmIZRdKlFGUvaUrg

It is on the Battle tab. I am using the Drag and Drop feature, it will append words on the text after put the letters on the grey box.
B
13
S
1
Posts: 48
Reputation: 615

Post » Thu Dec 07, 2017 6:12 am

You need to provide more information - instructions on how to play (not all of us here know Japanese :) ), how the game is supposed to work, what exactly is the problem?

Image
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
129
Posts: 1,805
Reputation: 68,935

Post » Thu Dec 07, 2017 8:52 am

I am using a drag and drop feature, the words that supposed to be spelled are below the layout, like sensei, ashita, mikan, gakusei and so forth. Each letter are assigned with texts that have been included in the event sheet.

By dragging each letter to the grey box, letters will be appended in the Word plugin text. When tap on the attack button, if the words are correct by comparing the words of Word text and the other plugin texts which are outside of the layout, animation for the player should start, else the skeleton will animate.

When the first time I tried it, it worked. But now it doesn't. There are some bug in the game, but I will fix it later.

I need to know what is wrong with the current error. T-T
B
13
S
1
Posts: 48
Reputation: 615

Post » Thu Dec 07, 2017 9:17 am

I don't know any of the Japanese alphabets and have no idea which letters to choose.

What I can say after a quick look at your project is that it's very inefficient.
Your letters sprites are HUGE - 1367x1368 pixels each! This greatly affects performance, memory usage and project size.
Resize them and add all to just one sprite as different animations.
Then you'll be able to remove about 70 events from your "Letters" group!
And your project will likely reduce in size from 26Mb to 1-2Mb.

Image
(image clickable)

Also, you should name your objects correctly. You have about 150 sprites named "SpriteXXX", and a dozen of tilemaps named "Tilemap". How can you possibly find the right object in this mess?
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
129
Posts: 1,805
Reputation: 68,935

Post » Thu Dec 07, 2017 10:27 am

Message: max2612 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I'm sorry, I should've mentioned you that I am still a newbie and learned everything from Youtube. I will rename and resize it to make it more efficient.

Here are the letters that can be used to formed the word "sensei".

https://goo.gl/h4rsXU

"add all to just one sprite as different animations" and I have no clue what does this word meant.
B
13
S
1
Posts: 48
Reputation: 615

Post » Thu Dec 07, 2017 11:26 am

See my screenshot above -
A sprite object in C2 can have many animations. Each animation may have many frames.
You can have just one sprite named "Letters". When you double click it, there will be a small window with the list of animations.
Create separate animation inside this sprite for each letter.
When you add a sprite instance to your layout, you can select (on the left panel) which animation and frame of the sprite will be displayed.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
129
Posts: 1,805
Reputation: 68,935

Post » Thu Dec 07, 2017 12:01 pm

Your code doesn't work because your event 78 checks if Word contains all words!
It basically says "if text is sensei AND arigatou AND ashita AND ..."
It should be an OR block.

But again, this code is extremely inefficient... You shouldn't use Text objects just to store single words.
I fixed this event, created Letters sprite with a few animations (you should add other letters) and cleaned up your Battle event sheet:
https://www.dropbox.com/s/85ns0e0ntz8sm ... .capx?dl=0

Of course, there are still a lot of unresolved issues -
1. I can drop letters on top of each other.
2. If I used "se" letter once, I am unable to use it again. (sensei needs two letters)
3. If I pick up letters again after I dropped them, or if I change their order, the Word.text should be recalculated. Currently a letter is just appended at the end, which is wrong.
etc..
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
129
Posts: 1,805
Reputation: 68,935

Post » Thu Dec 07, 2017 3:42 pm

For the unresolved issues of 1 and 3, I'm still searching for tutorials on Youtube and tutorials in this forum.

As for number 2, there are two character sprites of "se" in the layout.

I downloaded your .capx provided and I still can't figure out how you display the sprite. I'm confused. You said that use sprite instance, which I don't see it. Is it the instance variable because I don't see any changes there though :?:
B
13
S
1
Posts: 48
Reputation: 615

Post » Thu Dec 07, 2017 3:56 pm

"Letters" sprite is an object.
When you add copies of "Letters" sprite to the layout, you create its instances.
For each instance you can select different animation and other properties, set different values for instance variables.
It's one of the very basic principles in Construct 2.

Image

All these letters on the layout are different instances of the same Letters sprite.

To sum up:
Having 100 letters as 100 different sprite objects is bad.
Having 100 letters as 1 sprite object with 100 instances is good.
:)
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
129
Posts: 1,805
Reputation: 68,935

Post » Thu Dec 07, 2017 4:16 pm

I see. I think this part of making it work have been solved. Thank you.

Right now I just need to figure out how to fix the issues you mentioned.

And there is one other problem. Should I open a new topic or post it here? Because it talks about the animation and spawn to the current animation.
B
13
S
1
Posts: 48
Reputation: 615

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests