How do I move enemies like in Mario?

Get help using Construct 2

Post » Wed Nov 12, 2014 11:44 pm

Which approach is the best:
- adding 'platformer behavior' and use invisible obstacles?
- using rex moveto plugin? (but I'm not sure how to get good effect:)

Also how can I destroy blocks like in Mario?
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Thu Nov 13, 2014 1:12 am

Just use sine behavior for the enemy.

for the blocks:
player on collision with blocks
player x less than blocks x ------------------- blocks - destroy.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Thu Nov 13, 2014 2:21 am

@A0Nasser

I tried sine - but it is good only for objects with "neutral" look (i.e. some spikes);
because it does not "mirror" image when going left/right

I tried also bullet behavior, but it can fly when bounced off some object ;)
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Thu Nov 13, 2014 3:06 am

look at move an enemy on this page from the tutorial section
https://www.scirra.com/tutorials/253/ho ... ame/page-7
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Thu Nov 13, 2014 5:03 am

@volkiller730

I have heard that platformer behavior can slow-down game if many enemies uses it,
but yeah, it seems to be the best option anyway
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Thu Nov 13, 2014 7:31 am

@symek well you can move it differently using set x or whatever you prefer just replace that action, but that tutorial is a good building block for what you are asking
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Thu Nov 13, 2014 7:48 am

@volkiller730

ok, it's working :) Now I try to get this effect when you touch enemy and you loose energy
and the enemy is going forward anyway... so I set up disable solid for 2 second after loosing energy (so enemy have 2 seconds to move through player) and then enable solid again
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Thu Nov 13, 2014 8:27 am

Are you asking how to do that or saying thats what your doing?
B
42
S
17
G
2
Posts: 850
Reputation: 6,209

Post » Thu Nov 13, 2014 8:42 am

@volkiller730

I went off-topic
ok, case closed :D
Thanks for help
B
18
S
7
G
1
Posts: 783
Reputation: 4,247

Post » Thu Nov 13, 2014 3:54 pm

@szymek
I'm using sine for enemy in my game:
http://www.scirra.com/arcade/addicting- ... 7795/dario

Test it and if you want the capx i will send it to you.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Next

Return to How do I....?

Who is online

Users browsing this forum: MadSpy and 21 guests