An Issue with Enemy Movement

Get help using Construct 2

Post » Fri Dec 04, 2015 1:43 am

Message: brettmartin4 is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
So, I've been trying to figure out how to make one of my enemies randomly move either vertically or horizontally at random after stopping for 1 second at a time. I had what I believed was the proper event sheet, but it doesn't seem to be working at all; the enemy is still idle. I've attached a link to a picture of the event sheet. Could someone please tell me what I'm doing wrong?
B
7
Posts: 16
Reputation: 307

Post » Fri Dec 04, 2015 1:46 am

Looks like I cant post links. The image is on imgur dot com slash ao6NG1C
B
7
Posts: 16
Reputation: 307

Post » Fri Dec 04, 2015 5:24 am

I think what you need to do is make an instance variable, and set it to 0. Make an event that if the variable is at 0 then every x seconds it randomly chooses 1-4. Use the numbers to simulate the directions, then after another x seconds it changes back to 0. Hope this helps.
B
12
S
3
Posts: 30
Reputation: 842

Post » Fri Dec 04, 2015 6:07 am

Thats essentially what I did, but it doesnt work at all.
B
7
Posts: 16
Reputation: 307

Post » Fri Dec 04, 2015 7:35 am

you can get around the posting of links by adding spaces into your link eg ht tps://w ww.scirra. com/forum/

anyway this is one way

Image
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
63
S
32
G
39
Posts: 1,194
Reputation: 26,657

Post » Fri Dec 04, 2015 7:57 pm

This will give me something to start with, thanks!
B
7
Posts: 16
Reputation: 307

Post » Fri Dec 04, 2015 8:02 pm

Now, I changed the ES so that instead of changing the X and Y values, which make the movement look choppy, I simulated an 8-directional movement. Is there any way for me to only have it simulate a certain direction for a particular amount of time or pixels?
B
7
Posts: 16
Reputation: 307

Post » Fri Dec 04, 2015 8:17 pm

Never mind. I used the bullet behavior to achieve this action.
B
7
Posts: 16
Reputation: 307


Return to How do I....?

Who is online

Users browsing this forum: AllanR, Cryttexx, jhjconstruct and 9 guests