DeBug: Enemy movement and loot drop

Get help using Construct 2

Post » Sat Sep 07, 2013 11:41 pm

Ive been stuck on two problems with my 1st creation here.

My BadGuys do not move and when they are killed they wont drop loot.

I have followed tutorials/forum advice on how to make these work, but my implementation must be faulty. I cant figure out why.

https://www.dropbox.com/s/ccgc5im65adyia3/First%20Game.capx

B
6
Posts: 12
Reputation: 274

Post » Sun Sep 08, 2013 12:50 am

1. The text compare is case sensitive. You have Move = "Left" but your event checks for Move = "left".

2. You should use an invisible sprite for the platform behavior or the enemies will likely go through the EdgeMarker... (https://www.scirra.com/tutorials/253/how-to-make-a-platform-game/page-4)

3. Don't use solid behavior on the enemies or they'll block each other.

4. The enemies have been destroyed before it gets to the loot spawning events. Use the 'on destroyed' condition to spawn the loot when an enemy is destroyed.

5. Use floor(random(1,3)) instead of round(random(1,3)).
floor(random(1,3)) = 50% chance of 1, 50% chance of 2
round(random(1,3)) = 25% chance of 1, 50% chance of 2, 25% chance of 3
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630

Post » Sun Sep 08, 2013 1:59 am

I love you.
Serious.
B
6
Posts: 12
Reputation: 274

Post » Sun Sep 08, 2013 2:33 pm

Ha you're welcome.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630

Post » Sat Nov 30, 2013 10:13 pm

Actually, better to use choose(1,2) then it's locked to 1 or 2 - 50/50 and wont waste the incredible amounts of CPU devoted to round().
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
27
S
8
G
3
Posts: 384
Reputation: 5,020


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests