Setting "alarms?"

For questions about using Classic.

Post » Thu Dec 31, 2009 6:40 pm

You can place walls outside of the visible playfield.

That's an interesting suggestion for the behaviors, but currently it's not possible.

About timers: be wary, there's currently a bug where if you fire a timer from another timer's events, it crashes. Also, despite the timers using names, you can only use one per behavior or they'll get confused.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Dec 31, 2009 6:40 pm

[quote="Silhouette":2vqi6m67]Hmmm. What about making a boundary for my level? My plane can fly right off the screen x.x.[/quote:2vqi6m67]

The easiest way to keep things in-bounds would be to create Solid objects outside the edges of your layout for things to collide with. ("Solid" is an attribute in the properties window, just put a check next to it.)

Such a device is known as Stainsor's Wall, after forum member Stainsor who asked the same question many eons ago.

Anyway, if you are using behaviors for your plane then keep in mind only some behaviors have Solid collision capabilities. Ball, Car, 8Direction, and Platform behaviors can all keep from passing through Solid objects automatically.

Custom Movement behavior can define what objects to push out of using events.

Physics objects only interact with other Physics objects. You can define what collision type a Physics object is in the properties.

Bullet behavior doesn't have any built-in collision for Solid objects, it'll just pass right through (unless you make events to tell it to do otherwise).

If you are making your own custom movement with events then you will have to make your own custom collision events as well.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu Dec 31, 2009 6:54 pm

Hmm, thanks for the info on timers.

I like the idea of placing walls outside the play field, but the things is, I don't even know how to set up impassibility. Like, how do I make a collision event that just prohibits movement. *scratches head*

I'll keep looking around. Tutorials for construct seem so limited. Good thing the forums are very newb friendly. :D

EDIT: Didn't see deadeye's post.
B
3
G
3
Posts: 18
Reputation: 911

Post » Thu Dec 31, 2009 7:32 pm

This next question applies more in game creation in general, rather than to any specific action.

In gamemaker, your objects were stored in a list, and you could add them to the world freely. However, in construct, is seems to me that if you have an object that isn't created on start up(like a bullet), you must still place it in the layout. Although you can place it outside of the game screen, the object still exists in the game.

For example, if I have a projectile, and I want to create it from a ship when I hit the space bar, I have to have it created in the layout already, somewhere outside of the game screen. That's all fine and dandy. However, the problem arises when I make something like a homing missile. Even though it's outside of the game screen, it will still enter the game screen and chase down a target as though it had been fired.

I guess my question is, in simple terms, how do I deactivate objects outside of my game screen so that they do not carry out any actions? Hope my question made at least some sense.

Edit: Also, I ran into a problem with using solid objects as boundaries.

Apparently, at corners of the map, where two objects overlap to form a wall, I can move into the corner, and glitch through the boundaries and out of the level. If you don't know what I mean, see for yourself:
http://www.filedropper.com/wip_1

In the upper left corner of the screen, check the boundaries, and then try glitching through them. Fairly easy right? How do I fix that?
B
3
G
3
Posts: 18
Reputation: 911

Post » Thu Dec 31, 2009 8:50 pm

[quote="Silhouette":3ejr4dgl]Good thing the forums are very newb friendly. :D[/quote:3ejr4dgl]
QFT!!

as for deactivating objects, you have to destroy them "on layout start".
Destroying the ones out of layout is a good idea, but sadly in Construct you can't just refer to all objects at the same time unless you stuff them in a family.

SO, what you'd do is stuff every single object in your game in a family (say, Blue) and then do
+ System: Start of layout
+ Blue: Is outside layout
-> Blue: Destroy

A default family would be nice, methinks. Anyways, that works, or you can just go object by object destroying them on layout start.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Thu Dec 31, 2009 8:53 pm

Very nice response. I'll implement that right away.

Any advice as to my boundary problem?
B
3
G
3
Posts: 18
Reputation: 911

Post » Fri Jan 01, 2010 11:22 am

You don't actually have to make any events to destroy things at startup - there's an attribute called "Destroy at startup" that does exactly what the name would imply :wink:
B
16
S
8
G
4
Posts: 136
Reputation: 3,144

Post » Fri Jan 01, 2010 4:11 pm

[quote="Silhouette":2k83ovrj]In gamemaker, your objects were stored in a list, and you could add them to the world freely. However, in construct, is seems to me that if you have an object that isn't created on start up(like a bullet), you must still place it in the layout. Although you can place it outside of the game screen, the object still exists in the game.[/quote:2k83ovrj]
The "Destroy at Startup" attribute as mentioned is the way to go.
Even if you have a single bullet outside your layout and you set it to "destroy at startup", the bullet object is still able to be referenced in events. You can spawn more in your layout at any time, even though the first and only one placed in the layout was destroyed on startup.

While I haven't looked at the file link, perhaps try making your outer walls much thicker, make sure they are set to bounding box collision, and make sure they are either overlapping or perhaps touching neatly.
B
3
S
1
G
3
Posts: 82
Reputation: 1,189

Post » Sat Jan 02, 2010 8:25 pm

[quote="Daiz":gvkz55a6]there's an attribute called "Destroy at startup"[/quote:gvkz55a6]
Ugh I always forget about attributes. Yeah, what he said >_<
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests