Collision and Timer functions in construct 2

Discussion and feedback on Construct 2

Post » Tue Aug 16, 2011 1:30 am

Hey guys, first of all thanks a lot already I've been browsing the ton of support already written and it helped me go a long way.

now here's a couple questions that I just can't figure out by myself so I'm hoping you can give me a tip or two;

1. Collisions; What's the way to make flag an object to collide? The Solid behavior seems turned off when combined to another behavior, like say Bullet.

You can see in my .cap, I tried a lot of different ways (bullet speed, custom movement, asin, acos...) all unsuccesul. Basically I want the little baddie that's following my character to collide and slide along walls so I can use walls to stop its course (like in Earthbound).


2. Timers; In Construct classic you could create a Wait object that you would use to count milliseconds. Now it's nowhere to be found in Construct 2 and I'm sure there is a easy way to manage delays...


3. There are no Box objects anymore? Trigger box has to be sprites? The bunch of basic sprite drawing tools also seem to have dissapeared. How do you position hotspots/pivot points now? Just wanted to know if that stuff just moved somewhere else.

Other than that I miss the Ctrl+P shortcut... but that's it. :)

My cap file;
http://dl.dropbox.com/u/38319441/RPGtest.capx

Infinite thanksGropwel2011-08-16 08:13:15
B
4
S
2
G
2
Posts: 108
Reputation: 1,366

Post » Tue Aug 16, 2011 7:58 am

[QUOTE=Gropwel]1. Collisions; What's the way to make flag an object to collide? The Solid behavior seems turned off when combined to another behavior, like say Bullet.

You can see in my .cap, I tried a lot of different ways (bullet speed, custom movement, asin, acos...) all unsuccesul. Basically I want the little baddie that's following my character to collide and slide along walls so I can use walls to stop its course (like in Earthbound).[/quote]

Unfortunately you provided the .caproj file, without providing the other files.
Either you put a zip containing the full folder, or save your project as a single .capx file for this purpose.



[QUOTE=Gropwel]2. Timers; In Construct classic you could create a Wait object that you would use to count milliseconds. Now it's nowhere to be found in Construct 2 and I'm sure there is a easy way to manage delays...


3. There are no Box objects anymore? Trigger box has to be sprites? The bunch of basic sprite drawing tools also seem to have dissapeared. How do you position hotspots/pivot points now? Just wanted to know if that stuff just moved somewhere else.

Other than that I miss the Ctrl+P shortcut... but that's it. :)

My cap file;
http://dl.dropbox.com/u/38319441/RPGtest.caproj

Infinite thanks[/QUOTE]
For 2. and 3. C2 has been and is still in developpement.
Most of the plugins of CC haven't been ported yet to C2. In the future they probably will.

For now, yes you have to use sprites to "emulate" box/trigger plugins and there is no image/point/hotspot editor for C2. You have to do your images out of C2 and the hotspot is nothing but the center point of your image.

For the wait, you may workaround using the "every X sec" event combined with group. (The group is only enabled when you need it, and contain only a "every 0.1 sec" event for example, disabling the group as last action).

C2 is yet to "grow" and being build up. I guess your needs might get fulfilled in the next monthes/years of developpement.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Tue Aug 16, 2011 8:24 am

Ah you're right, I fixed the hyperlink, should work now

http://dl.dropbox.com/u/38319441/RPGtest.capx[/URL]

Well thanks a lot for the info,... I can finally stop searching lol!
Looks like I'll be sticking to Classic for a while.

But I can't help but ask another one that's been bugging me for a long time, might sound stupid but here goes; is there any way to group objects in Classic? Kinda like the layers in 2.0. So then I could move and edit the whole forest instead of picking up every tree every time?

Odin bless you friend.
B
4
S
2
G
2
Posts: 108
Reputation: 1,366

Post » Tue Aug 16, 2011 8:52 am

Ok, so after having take a look at your .capx, I see what you mean by "bullet overrides solid behavior" but I can't think of a correct solution right now. I think though, your idea of handling its movement with the "IsColliding" variable is correct, and that you should keep working in that sense. Also, I guess bullet behavior is not the best option, you can do the same thing it does using the action Sprite.Move forward (in Size & position) once you put the angle to player's position.

From there, in your event "mushy_env on collision with enviro" you could manually change its position alongside enviro.

As I said though, I don't know if that's a correct solution.


Considering your question about group objects, are you talking about families ? (another tutorial about families)
"Families" only are implemented in CC atm, not in C2 (yet).
Kyatric2011-08-16 11:59:09
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Tue Aug 16, 2011 7:44 pm

[QUOTE=Kyatric] Considering your question about group objects, are you talking about families ? (another tutorial about families)
"Families" only are implemented in CC atm, not in C2 (yet).
[/QUOTE]

Hmm as I understand it families seem to be useful from an event scripting point of view. Each elements of a same family will still be selected and moved around individually in the layout editor.

I'm looking for a basic grouping function based on parenting. There is a whole object property subsection named "Groups" I thought maybe it's the Container property, it gave a yellow outline to the "contained" objects but I failed to see any other effect. I though maybe by placing them in the same object folder in the project tree that might do the trick, maybe by shift+clicking on the folder it would select every sub files, nope...

If there is no assets grouping function :~( I'm thinking building my levels directly into photoshop might be the way to go.



B
4
S
2
G
2
Posts: 108
Reputation: 1,366

Post » Tue Aug 16, 2011 7:49 pm

And thanks a lot for taking a look at my .cap file! I got plenty of ideas for solutions now. I'll try them using Classsic and tell you about my results.
B
4
S
2
G
2
Posts: 108
Reputation: 1,366

Post » Tue Aug 16, 2011 7:54 pm

Containers will pair objects together in such a way that if you spawn an object that is member of a container, all the other objects of the containers will also be spawned and paired to the current object (you don't spawn each object individually).
It eases some picking issues.

You also have the pairer object which is a plugin that helps you pairing two objects together. But I think it is limited to only two.

Construct-Classic is fairly documented in the wiki as well as in the forum (you can search specifically in the category Construct-Classic).

I hope this covers what you are looking for.Else, don't hesitate to ask in the CC part ^^
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Tue Aug 16, 2011 8:08 pm

Oh right, good to know!

damn it's gonna be a lot more work editing each asset of a level individually... I think shift+clicking a folder would be the best cheapest solution without creating anything really new, I'll try maybe making a suggestion.

Well back to the Classic section then. Thanks !!
B
4
S
2
G
2
Posts: 108
Reputation: 1,366


Return to Construct 2 General

Who is online

Users browsing this forum: RageByte, TELLES0808 and 9 guests