[REQUEST] Spawning enemys

For questions about using Classic.

Post » Sun Feb 20, 2011 1:39 am

Well...

I have a project of platform shooters...
And, I've found a problem, I don't know how to create a variable of health for the enemys, and, when they die, respawn in a random place.

I could do that, respawn in a place, but it isn't random, the new enemy can't die, I think that this is a problem of the variable...

Could somebody help me?
Here is the .cap

http://www.4shared.com/file/Q1lYQccJ/Shooters2.html

Thanks :D
B
1
G
1
Posts: 9
Reputation: 443

Post » Sun Feb 20, 2011 3:37 am

The only problem I see is that the enemy spawn isn't random. The new enemy does have health and does die. Because you create a new enemy, you need to click to a different list and back again when debugging.

One way to make a random respawn is to simply move the enemy to a random X and Y and refill the health. I don't know how to add image points to a layout, so using a random generator there doesn't help.

Edit: You may want to work on how the player's bullets interact with the player. I was able to jump and shoot myself. It didn't cause damage, but I can't shoot an enemy below me.
B
2
G
1
Posts: 22
Reputation: 494

Post » Sun Feb 20, 2011 3:28 pm

@Tork:
I moved your first thread here from the Tutorials subforum, but I see you've already made another so I just deleted the old one. Just in case you're wondering where it went.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Feb 20, 2011 3:56 pm

Amm Thanks...
@deadeye:
I made this post in another subforum, and somebody said me that was in the wrong forum...
So, I created this here...
Thanks for delete :D

PD: I tried with X: random (360), Y: random (360)
But, the enemy appear in any place... Into a wall... o.O
And... another Question...
If I put the enemy with the behavior "Platform", i can manage it... How can I fix that?
I want that they be affected by gravity.

Thanks
B
1
G
1
Posts: 9
Reputation: 443

Post » Sun Feb 20, 2011 6:29 pm

Set the controls to Player 2 (up to 10 as long as you aren't using it), then under the start of layout ignore control. You find that under Sprite > Platform tab.
B
2
G
1
Posts: 22
Reputation: 494

Post » Sun Feb 20, 2011 8:50 pm

:O Thanks!!!
Really thanks, I could fix that...
But, the enemy try to Hit me, when they would try to shoot me...

Can somebody helpme va mail?
Please MP... :D
B
1
G
1
Posts: 9
Reputation: 443


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests