My 3¢ about c2 and c3

Discussion and feedback on Construct 2

Post » Sun Oct 04, 2015 11:59 am

nimos100 wrote:
megatronx wrote:Hey,

I was thinking about conversation in this topic. Friend encouraged me to continue a certain project I was affraid of finishing (quite personal and you want to have those working perfectly ). Thanks to your posts and Ro0j's help i got from him throughout the years, I decided to limit using plugins and do as much possible with events. So far it seams to work better then with plugins. But I'd like to ask you if you could explain this math formula to me, what exactly does it do?

Thx!


@glerikud I think move too should also be an action. Overall there should be more target action, as well as option to pin to image points. More actions is something I'm thinking often about too.

Btw, does every tick: set position to img point is as efficient as PinTo?

The formula is to calculate the position of an object(position) based on an angle and distance and the starting point (X,Y) of another object(position)

Image
Position written next to the objects are from the editor, just so you can see there placement there.

Regarding the every tick and pin to. Im pretty sure its the same. There might be a different to when the position change takes place. As the pin to might happen during the first period of a tick, where as a every tick might happen depending on where you put it in the code. But resource wise I don't think there is any different, not 100% sure but close enough that I wouldn't bother about it :D


Thx! Interesting! Thought have no clue how I could use this yet!

Also @Ashley Could you please add keyboard, joypad and mouse action : Cancel Input, so all keys that are currently pressed would stop working and require player to press them again? This is crucial. Imagine a scenario where a power is activated, and that power stops all movement. When the power events end I want the player to press keys again in order to move. Currently if you hold movement buttons, when power ends, the character continues to move, and because I'm doing an isometric game, if direction is being switched mid trough, the player moves backwards. This also would work for other action games, where for example a hit from enemy interrupts player attack.
Thx
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
92
S
30
G
22
Posts: 1,987
Reputation: 20,178

Post » Sun Oct 04, 2015 12:58 pm

It's about where you want to go.
With the formula you can find any other position if you have some other information provided, such as the angle pointing at the other node angle(), and the distance().
Think of it as arrows pointing where to go.
With the behavior you get the positions already, but using the dist, or distance part of the formula you can say what distance you want to be at from that point with distance(node0.x,node0.y,node1.x,node1.y) being the max dist.
Using the indexing system of course.
Image ImageImage
B
171
S
50
G
180
Posts: 8,396
Reputation: 113,986

Post » Mon Oct 05, 2015 10:06 am

megatronx wrote:Also @Ashley Could you please add keyboard, joypad and mouse action : Cancel Input, so all keys that are currently pressed would stop working and require player to press them again?

Again, this seems easily doable with events. I don't want to get in to the habit of adding built-in features that just replicate what a few simple events could do.
Scirra Founder
B
399
S
236
G
89
Posts: 24,546
Reputation: 195,436

Post » Mon Oct 05, 2015 10:29 am

Ashley wrote:
megatronx wrote:Also @Ashley Could you please add keyboard, joypad and mouse action : Cancel Input, so all keys that are currently pressed would stop working and require player to press them again?

Again, this seems easily doable with events. I don't want to get in to the habit of adding built-in features that just replicate what a few simple events could do.


Ok, no problem, but could you instruct me how I could achieve that with events, please?

[email protected] On key pressed: toggle boo ON, Is Boo: move, On event: Toggle Boo OFF . I think this will work. And I'm going to leave this here if someone will need it.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
92
S
30
G
22
Posts: 1,987
Reputation: 20,178

Post » Mon Oct 05, 2015 2:14 pm

@Megatronx, the easiest way to achieve what you need depends somewhat on how you already register key and controller inputs and then use that info to control the player. I set booleans on a player control object according to key or button positions. If you need to force the player to have to let go and then press a button again, you could add an "disable" boolean, and check that is false before the player move events. Then you should only reset the boolean to true when the buttons are released. Depending on what it is you need exactly you could use one disable boolean for each control input. You might get away with only one boolean for all of them, but I suspect that such a method could prove to be problematic.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,255
Reputation: 46,484

Post » Mon Oct 05, 2015 8:48 pm

I don't think that ashley should pre-code every single thing for us just to make it easier for everyone.
If it's possible per events (not hardcore workarounds), it should be fine.

Of course, some basics should be available, i'm not trying to get rid of everything, nor would i hate to have such features.

My personal and most important things i'm still wishing for are:

Basic support for isometric games (At the current stage it's simply a huge experiment everyone has to go through and there's no good nor real solution in any part of an isometric environment. Unless for professional coders maybe)

True and dedicated multiplayer support.


Looking forward to more great and actually released PC Games using Construct.
B
40
S
8
G
3
Posts: 159
Reputation: 3,019

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests