Tilemap spikess

Get help using Construct 2

Post » Mon Dec 08, 2014 3:32 pm

So, i made a tilemap and in my tilesheet i have spikes, i was wondering if it was possible to single out the spikes so that when i collide with them it destroys my player? or would i have to import the spikes as a seperate sprite. Thanks for the help in advance and any help is appreciated! :D
B
5
S
1
Posts: 25
Reputation: 427

Post » Thu Dec 11, 2014 4:52 am

I did this once. I don't recommend it. heh.
B
88
S
43
G
71
Posts: 601
Reputation: 43,669

Post » Thu Dec 11, 2014 5:02 am

Ive never tired it but what if you had a "danger zone" sprite. Invisible but script it so every time a #4 Tile is created, create a DangerZone sprite at that location. Then just script it so when the player clips that sprite they die/take damage.

So if every tile #4 is the spikes, after the map is finished seeding have a for loop for every & Tile=Tile#4 create DangerZoneSprite at X=Tile4Instance0(X) Y=Tile4Instance0(Y) and have a variable ++1 for every time the loop runs and using that for which instance of the tile in question

But I have never tried it so I may need tweaking.
"Were all mad here. I'm mad, your mad." "How do you know I'm mad?" Asked Alice. "You must be" Said the Cheshire Cat. "Or you wouldn't have come here"-Lewis Carroll: Adventures In Wonderland
B
7
S
3
Posts: 113
Reputation: 1,295

Post » Fri Dec 12, 2014 12:11 am

CrazyVulcan wrote:Ive never tired it but what if you had a "danger zone" sprite. Invisible but script it so every time a #4 Tile is created, create a DangerZone sprite at that location. Then just script it so when the player clips that sprite they die/take damage.

So if every tile #4 is the spikes, after the map is finished seeding have a for loop for every & Tile=Tile#4 create DangerZoneSprite at X=Tile4Instance0(X) Y=Tile4Instance0(Y) and have a variable ++1 for every time the loop runs and using that for which instance of the tile in question

But I have never tried it so I may need tweaking.


This was great! Thank you for the suggestion, this is making life 1000x easier :mrgreen:
B
5
S
1
Posts: 25
Reputation: 427


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests