A few questions...

For questions about using Classic.

Post » Fri May 23, 2008 12:18 am

Hi. I found Construct a few weeks ago on another forum and I decided to try it out. I'm currently working on a small zombie game and I've run into some snags.

Here's the cap: carnage.cap

1. How would I set an object to no longer be solid? In my game, my zombies were originally set to be solid objects, so the player couldn't walk over them. When the zombies "died," however, they were still solid and the player couldn't walk over them. I tried moving the "dead" zombies to another layer, but that didn't work.

Also, while solid, my zombies kept pushing the player in the direction they were headed. How do I make them stop and "attack" the player when near him, and then start walking again when the player moves away?

2. When a zombie is shot it creates a "blood" sprite that overlaps it. How do I spawn the blood sprite behind the zombie? Setting "blood: Place behind zombie" (which I've done twice) doesn't work. I think I got this to work once before, but I screwed up somewhere and forgot how to do it again.

3. The kills counter (as well as the TotalZombies counter, I suppose) doesn't work because of the way I have the zombies' "death" set up: First I change their sprite, and then I have them fade out and deleted from play. This, however, causes the kill counter to increase repeatedly while the current zombie still exists. Is there a way I can make this action only happen once?

4. I plan on adding more kinds of monsters (and possibly weapons) to the game, but I don't want to do all my events over again. Is there a way to have one event affect different objects the same way?

5. In a different version of the game, I had both DirectSound and MOD objects (for gunshots and music, respectively). Whenever I played the gunshot sound while the music was playing, it screwed up the music. Is there a way I can stop that, or should I just use MP3s instead?

Thanks for the help.
B
1
G
4
Posts: 6
Reputation: 1,037

Post » Fri May 23, 2008 12:44 am

[quote="Boxtop":35q2rh3y]
[size=50:35q2rh3y]1. How would I set an object to no longer be solid? In my game, my zombies were originally set to be solid objects, so the player couldn't walk over them. When the zombies "died," however, they were still solid and the player couldn't walk over them. I tried moving the "dead" zombies to another layer, but that didn't work. [/size:35q2rh3y]

[color=#0040FF:35q2rh3y]You could either disable solid and make your own collisions in the event sheet, or you could spawn a "dead zombie" where the living one was upon being killed.[/color:35q2rh3y]

[size=50:35q2rh3y]2. When a zombie is shot it creates a "blood" sprite that overlaps it. How do I spawn the blood sprite behind the zombie? Setting "blood: Place behind zombie" (which I've done twice) doesn't work. I think I got this to work once before, but I screwed up somewhere and forgot how to do it again.[/size:35q2rh3y]
[color=#0040FF:35q2rh3y]
In your always event, moving the "place behind" to the top seemed to fix it for me.[/color:35q2rh3y]


[size=50:35q2rh3y]3. The kills counter (as well as the TotalZombies counter, I suppose) doesn't work because of the way I have the zombies' "death" set up: First I change their sprite, and then I have them fade out and deleted from play. This, however, causes the kill counter to increase repeatedly while the current zombie still exists. Is there a way I can make this action only happen once? [/size:35q2rh3y]

[color=#0040FF:35q2rh3y]Did you try using "Trigger Once While True" under system?[/color:35q2rh3y]


[size=50:35q2rh3y]4. I plan on adding more kinds of monsters (and possibly weapons) to the game, but I don't want to do all my events over again. Is there a way to have one event affect different objects the same way?[/size:35q2rh3y]

[color=#0040FF:35q2rh3y]Add them to a Family. Make one and name it something like "Monsters" then add them to the family and create your events using the Family instead of the individual monster.[/color:35q2rh3y]

[size=50:35q2rh3y]5. In a different version of the game, I had both DirectSound and MOD objects (for gunshots and music, respectively). Whenever I played the gunshot sound while the music was playing, it screwed up the music. Is there a way I can stop that, or should I just use MP3s instead?[/size:35q2rh3y]

[color=#0040FF:35q2rh3y]Not sure there. Haven't played with that much myself.[/color:35q2rh3y]


[size=50:35q2rh3y]Thanks for the help[/size:35q2rh3y].[/quote:35q2rh3y]
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Fri May 23, 2008 12:54 am

[quote="Jeswen":3hxtb0ri]In your always event, moving the "place behind" to the top seemed to fix it for me.[/quote:3hxtb0ri]

Worked for me, too. Thanks.

[quote:3hxtb0ri]Did you try using "Trigger Once While True" under system?[/quote:3hxtb0ri]

I tried it now, but it only increased the kill counter once, and then wouldn't increase it again after other zombies were killed. I'm assuming I was supposed to make "Trigger Once While True" a subevent of "Zombie: value 'hitpoints' less then or equal to 0".
B
1
G
4
Posts: 6
Reputation: 1,037


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest