How do I get in the right tracks? [.capx]

Just started using Construct 2? Post your questions here

Post » Wed Aug 10, 2016 11:33 pm

Message: assfoder can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
Hello!
I'm completely new to C2.
I'm trying to clone this game, https://www.youtube.com/watch?v=vxdDC-S6dsY Rushfight, because me and some of my friends love it, and not everyone can play it (system requirements). I know it was made in Unity, but I was amazed with C2 and it's community.

I'm using artwork from Garou: Mark of the Wolves, because I think it could add even more fun to this gameplay. But I've reached a point where I know, from the manual, tutorials, and the forum, that things could be made in a smarter way preventing strange behaviours and redundancy in the event sheet. So I would like to know what you guys think.
I'm sharing https://dl.dropboxusercontent.com/u/14496301/C2/kickass.capx the file to get guidance on what should be changed in order to get in the track to achieve a similar gameplay.

Issues (problems):
- if i hit the keys faster the collision detection sometimes fails;
- I can't make a curved move to out of the screen, and again, with fast typing, this particular 'MoveTo' sometimes isn't complete and the object stays on screen, instead of going the distance I typed;
- I don't understand why I can't call a function I named "Spawn";
- on start of layout, some objects detect collision even though they're not 'in collision';
- ...

Sorry for the bad english, and the messy event sheet, but I really like this tool!!
Thank you.
B
4
S
1
Posts: 6
Reputation: 312

Post » Thu Aug 11, 2016 12:03 pm

- I don't understand why I can't call a function I named "Spawn";
You're calling the expression Spawn, not the function Spawn.

- on start of layout, some objects detect collision even though they're not 'in collision';
You've set it up so that sometimes an enemy can spawn on top of the player based on co-ords.

Can you give more detailed example of what you think is wrong with the collision in terms of 'failing'?
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Thu Aug 11, 2016 1:29 pm

Thank you @plinkie! :)
Only later I can take a look again at the event sheet.

The object 'Enemy' moves towards the center of the screen using the 'rex_moveto' plugin, and when overlapping (not collision, sorry) the object 'Player', triggers the 'moveTo' below the screen (in pixels) and is destroyed. If I hit the keys extremely fast (one of the challenges of the game) the object 'Enemy' continues his path along the X axis passing the object 'Player' and not detecting the overlapping (what I was calling collision).
I'm afraid I'm not using the proper method for this 'moveTo' because, I will need the movements (and all of its events) to be made from point A to point B, in one key press, regardless how fast the user hit the keys.

Should I ask someone to move this thread to 'Works in Progress/Feedback Requests' because I'll want to read what you guys think it's the 'better' approach in the game's events?
B
4
S
1
Posts: 6
Reputation: 312

Post » Thu Aug 11, 2016 1:34 pm

There are probably better approaches to some of the ideas in this game, you can ask in the Feedback section. You could just start a new topic for this game. If you are having real problems with the MoveTo plugin you can find the topic for MoveTo and ask in there as plugins are considered separate and usually you will have to go to the person that made it to ask about its functionality.

Note that when you're moving a sprite you can just move it X and Y with 'Set X' 'Set Y' 'Set Position' without the use of plugins.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Thu Aug 11, 2016 4:08 pm

assfoder wrote:
The object 'Enemy' moves towards the center of the screen using the 'rex_moveto' plugin, and when overlapping (not collision, sorry) the object 'Player', triggers the 'moveTo' below the screen (in pixels) and is destroyed. If I hit the keys extremely fast (one of the challenges of the game) the object 'Enemy' continues his path along the X axis passing the object 'Player' and not detecting the overlapping (what I was calling collision).
I'm afraid I'm not using the proper method for this 'moveTo' because, I will need the movements (and all of its events) to be made from point A to point B, in one key press, regardless how fast the user hit the keys.


After some investigation I figured out that the reason for this is because they're set to 'Die' on collision with player but also are asked to move across X when the player presses left. This means they move and play die animation at the same time, the move angle of 0 overrides the die angle of 45. I fixed this by putting in the On EnemyMove logic, you check enemy is not playing the die animation. This works well.

Image

In terms of the gameplay, is it not better to have the enemies moving towards the player after an amount of time, not when the player is pressing the left arrow? Although I can understand if this is just temporary functionality.
B
46
S
16
G
79
Posts: 2,170
Reputation: 46,857

Post » Thu Aug 11, 2016 11:07 pm

Message: assfoder can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
@plinkie thank you again for your time. :)
You've helped me a lot to better understand some functionalities of the event list.
It works, but I found one example that does the movement better, in terms of distance traveled by the object 'Enemy' no matter how fast I hit the keys (and lots of other issues I also had).
It's from @KojotSan from here:
https://www.scirra.com/forum/how-do-i-move-object-toward-position-and-stop_t110500

I'll continue this thread on 'Works in Progress/Feedback Requests':
https://www.scirra.com/forum/feedback-better-aproach-to_t180430
B
4
S
1
Posts: 6
Reputation: 312


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 4 guests