currypuff's Forum Posts

  • What you could do is every: random(4,6) seconds enemy spawn bullet. That would make a bullet spawn between 4 and 6 seconds. Or when the enemy is spawned or when the game starts you could give it an instance value of random(0,6) and have a timer subtracting that value every second. When it reaches zero you could spawn the bullet and reset the timer to 6. Hope that helps.

  • What you can do is spawn a pistol sprite or play the pistol animation when 1 is pressed and then test for if the sprite is on screen or the animation playing when the mouse is clicked, from that you can fire the gun. Same with sniper, spawn or start animation when 2 is pressed and then test for if the sniper is on when you click.

  • Thanks guys, it work perfectly.

  • If you pin the dragging object to a center pivot point with a pin with a bar setting would that work? The drag behavior would still work while pinned.

  • In my game I have small bee enemies that attack the player in groups. I want them to do x amounts of damage per second per bee, but no matter the amount of bees overlapping the player it only accounts for the damage of one bee, not 10 for example. Is there a way to count the number of sprites overlapping another sprite so I can just multiply the damage of one bee by the total number of overlapping bees. Or is there a way for every bee to do individual damage on the player? All I have tried is; (bee) overlapping (enemy), every (1) seconds -> (enemy) subtract (x damage) from ( health). I don't get why this doesn't work, but I haven't tried much. Thanks to anyone who can help.

  • Thanks, I found what I was looking for. For anyone wondering how to do this I spawned a scorch mark sprite with the explosion, the scorch sprite had a blend mode of 'source atop'. Anything that was on the same layer as the scorch would have the intersection imposed. Anyway thanks again.

  • Is there a way to impose one image across the top of another where they intersect.

    For example if I have an explosion which spawns a black scorched earth effect can I only show the scorch effect where it overlaps with land.

  • Thanks for coming up with a solution, but I have decided to stay with the long beam bullet effect as it is more visually appealing and I worked out a way to get it to work. Here is the new event.

    bullet: is overlapping enemy___________________|enemy: subtract bullet.damage from health

    System: trigger once___________________________|bullet:set width to distance(weapons.imagepointX,weapons.imagepointY,

    Enemy: pick nearest to (bullet.ImagepointX(0),_|_____enemy.imagepointX(0),enemy.imagepointY(0)

    bullet.imagepointY(0))__________________________|bulletvisual: set width to bullet.width

    Now the bullet fades away after 0.01 seconds solving a couple of problems, and the bullet visual sprite stays for a little bit like a visual path for the bullet.

    Now the only problem is when a shotgun shoots multiple bullets if some hit and some miss all the visual bullets will be set to a width as if they have hit, when they should just go straight past the enemy. I need a way to pair certain bulletvisual sprites to the bullet that they are spawned with. If the bullet is a in a container with bulletvisual it disappears in 0.01 seconds like the bullet, but I don't want that, it needs to stay for a bit after it has hit. If anyone knows how to solve this thanks in advance.

  • Currently in my game guns fire a long, beam to give the effect of a bullet flying along the screen.

    When the bullet overlaps a 'enemy' this is the event that takes place.

    |Bullet: is overlapping enemy

    |System: trigger once

    -------- |bullet: is overlapping enemy----------------------|enemy: subtract bullet.damage from health

    -------- |enemy: pick nearest to (bullet.imagepointX, |bullet visual: set width to distance(weapons.imagepointX,

    -------- | bullet.ImagepointY)-------------------------- | weapons.imagepointY,enemy.imagepointX,

    -------- |system: trigger once------------------------------- | enemy.imagepointY

    -------- |------------------------------------------------------------|bullet: destroy

    This is what the event looks like in construct 2. The part to the right at the start is a sub event of the event above.

    The setwidth makes the bullets visual sprite look as if it has hit the enemy and been stopped in its path.

    I know this is difficult to understand without it right in front of you but it shouldn't matter, this system is flawed, a shotgun type weapon which shoots more than one bullet at a time doesn't detect hits right, shots that are too close together(time wise) don't detect right, and shots can miss altogether.

    I chose this way because if I use a Sprite with a bullet behavior The speed that I want the bullet is around 6000, this too causes problems. The bullet can completely skip through the enemy because of the frame rate not allowing it to collide, I think.

    Now that you have seen my two options I would like to know if anyone can come up with a solution to my problem.

  • Thanks on solving Q. 2 for me, I've realized if no one can come up with a solution for Q. 1 I could just do a 'next page' button, but it would still be great is someone could figure out how to do Q.1.

    Again thanks keroberos.

  • 1. If a sprite text box is set to an exact size can you make the text within that box scroll up or down to reveal more or less.

    2. Is there a way to make words fill up a text box over a period of time. (like if someone were typing or like what you see during cut scene conversation.)

  • On the game I'm making I've noticed that when I test it the graphics are of pretty average quality, even though it's simple pixel graphics. I don't know what settings might be causing this. I have tried making the images I import into the game 10x scaled up but even then there is still 'fuzzy edges' on the images. Thanks to anyone who helps.

  • Thank you, that was exactly what i was looking for.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would like to know if there is a way that by using the event of clicking a button i could close my game (like doing

    alt-f4 closing a page)?

  • Go to the layout and go to the layout properties bar, under event sheet tab, choose the event sheet you would like to use.

    Hopefully that solved your problem.