Faster way to do this?

For questions about using Classic.

Post » Tue Sep 27, 2011 2:58 am

Hello again! I am trying to make a mechanic where people would be able to phase into walls and have to platform inside them to move around, and deactivate to go back into the normal map. I got this to work, but the CPU spikes when toggled. I have it set up like this:

You press CTRL, a canvas covering the map if filled with white, the block objects spawn eraser objects onto a canvas and are pasted into said canvas. The canvas then updates a mask and all blocks are made nonsolid. When going out the canvas clears to transparent and blocks are set to bounding box collision, pushing the player out.

I can see where this would cause problems, but how else could I go about doing this, in a more efficient manner?

B
26
S
7
G
5
Posts: 202
Reputation: 5,235

Post » Tue Sep 27, 2011 3:07 am

Yo, it would be ALOT clearer what you were doing and trying to accomplish with a .Cap file...it sounds really interesting, but I can't wrap my noggin' around it.
B
17
S
3
G
4
Posts: 91
Reputation: 3,929

Post » Tue Sep 27, 2011 4:41 am

I wouldn't use the default platform push out, it uses the closest angle, and shoots you out instantly.
Instead I would suggest keeping the platform behavior disabled, and have a an overlapping condition, like: if player overlaps wall player set y to .y-1.
Course the trigger for after that can be a pain.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Tue Sep 27, 2011 4:43 am

http://dl.dropbox.com/u/21499454/Games/PLinus.rar

There is what I have ATM. it has a few test levels and whatnot that can be played. There is also an editor you can mess around with! (Unfinished)

This should explain what I mean.
B
26
S
7
G
5
Posts: 202
Reputation: 5,235

Post » Tue Sep 27, 2011 7:35 pm

If you put the whole level grid into an array you can set it up to just create invisible collision tiles around the player, and when you switch the collision tiles can be created in the empty space.

http://dl.dropbox.com/u/5426011/examples6/negativeSpace2.cap
B
79
S
24
G
54
Posts: 4,753
Reputation: 40,769

Post » Tue Sep 27, 2011 10:38 pm

That's brilliant! Thank you so much! :D

Now to finish the editor and main menu and I am ready to release a concept demo :)

EDIT: Yep! Got it to work! I got it to work with the arrays I were using, where 0 is space and 1 is a block. I had to add +32 to the end of the placement for creating because of some weird error.

Thanks again!! Phobos0022011-09-28 00:36:41
B
26
S
7
G
5
Posts: 202
Reputation: 5,235


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests