How do I make retractable spikes

Get help using Construct 2

Post » Sun Jan 31, 2016 6:13 pm

I want to make a mechanic that has spikes going in and out (kind of like don't touch the spikes). But I want it to be a random set of spikes each time. Help?
B
25
S
6
G
4
Posts: 173
Reputation: 3,933

Post » Sun Jan 31, 2016 9:22 pm

Depends on how far you want them to move. there are many ways of doing it. shine, bullet and pathfinding are most commonly used for that.

as for the spikes set collision points in the image it's self.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Sun Jan 31, 2016 9:24 pm

also you can set on event. set position of spikes every x seconds
or on event destroy spikes
on event system create spikes.
Last edited by Carbincopy on Sun Jan 31, 2016 9:26 pm, edited 1 time in total.
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Sun Jan 31, 2016 9:25 pm

@Carbincopy I understand, but I want any random spikes to do it, not all spikes or one spike at a time
B
25
S
6
G
4
Posts: 173
Reputation: 3,933

Post » Sun Jan 31, 2016 9:26 pm

add for each
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Sun Jan 31, 2016 11:37 pm

the way I did it for my project was to have floor tiles that can have spikes. You can perfectly add the randomess factor to it.
I added an intance variable called fSpikesID
and I use system Pick to know which spike trap is being activated.
I can send you images of the code if you want
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Mon Feb 01, 2016 12:02 am

@FraktalZero that would be excellent and thank you
B
25
S
6
G
4
Posts: 173
Reputation: 3,933

Post » Mon Feb 01, 2016 12:16 am

FraktalZero wrote:the way I did it for my project was to have floor tiles that can have spikes. You can perfectly add the randomess factor to it.
I added an intance variable called fSpikesID
and I use system Pick to know which spike trap is being activated.
I can send you images of the code if you want


Dear FraktalZero, Can you send me the images of the code. It would be of great help since I'm experimenting with something similar.
B
11
Posts: 27
Reputation: 448

Post » Mon Feb 01, 2016 12:32 am

Tell you what, tomorrow Ill try to put a small capx file with whats necessary. and Ill comment it.
Cheers
B
43
S
12
G
14
Posts: 488
Reputation: 10,570

Post » Mon Feb 01, 2016 12:38 am

FraktalZero wrote:Tell you what, tomorrow Ill try to put a small capx file with whats necessary. and Ill comment it.
Cheers


Thanks a lot! You rock!
B
11
Posts: 27
Reputation: 448

Next

Return to How do I....?

Who is online

Users browsing this forum: PROxMTswatTR and 12 guests