Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Construct 2 Help?

If anyone is curious about simple things you can make using construct 2 (I know there are lots out there), you can take a look at what I have done personally with the game maker. I used it for a few games myself.

Suspended Pop & Breakout HTML5
Direct Link to Games
24whfly.jpg


Asteroids
Play from your browser!
ou0291.jpg


I know the program a little bit, and I wanted to share some stuff I have completed using it. :) If you have any questions, feel free to ask!
 
@AeroLowe: Yes. Eventing_Guy's example will cause a loop, therefore you also need to add a "on [whatever button] clicked/pressed" condition into the same event, so that it only happens when that button is touched.

In other words, the event will have two conditions: button click/press, and cooldown = 0.

I did exactly that in my game, except I used a boolean, but that won't make a difference. You just need two different values to compare.

@Eventing_Guy RE: getting rid of background - Removing background in sprites does indeed mess up the collision. Construct 2 will automatically "guess" the collision area when you import sprites but it's not all that perfect. You will need to go into Edit animation to fix the collision polygons.

Note that if your sprite has several animation frames, once you adjust the collision for one frame, you can right click on the screen and choose "apply to all frames" or something like that, and it will apply the same shape in proportion to the rest of the frames. Again, it's not smart and if you have frames that change shape drastically, it will not adjust properly. So double check all frames quickly anyway to make sure they all have proper collision.
 

Jason

Awesome Bro

Does anybody know how to make an object, with the bullet behaviour, move AWAY from the player as opposed to towards him? I need something like this to set up the AI of my humans, I'm not quite sure how to do it...
 
You can also try making a formula in the parameter dialogue that sets the object's facing angle. Something like, facing the angle of the player then subtract 180, so that you're inverting the facing angle.
 
@J: There's a Bullet event action called 'set angle towards other object', or something like that, that lets you define two points and calculated an angle from that. If you feed it your image point's coordinates, you should be able to give the bullet the right direction pretty easily.
Alternatively, if you already have it moving towards the player, do what rosareven said:
Code:
Angle < 180 ? Angle = Angle + 180 : Angle = Angle - 180

@AeroLowe: I'm not aware of a (classic) Mario or Sonic game that actually uses a zooming camera... but I would go with just scaling the layer/layout, which shouldn't need an additional player focussing, as everything in the center before will still be in the center. Needs about 1 event if you combine it with a global that stores the zoom factor.
Code:
# prepare for pseudo-code!

Set Global("ScaleFactor") = 1.0

SetLayoutZoom(Layout:"MapAndCharacters") = Global("ScaleFactor")
 

Eventing_Guy

Awesome Bro

Venetia":35wrrpnn said:
Looking forward to your entry, EG :)

One note: When posting a link to your game, we won't want to download things, we'll be looking for a direct link to your uploaded HTML file. Your game will play within that HTML file.

1. How / Where do I do that?

----------------------------------------------------------------------------------------------------

2. I'm having a bit of a problem when I export... do I have to have the most up to date Construct 2
in order for it to work? Cause All it is doing is showing me a black screen.
 
Eventing_Guy":3159oio2 said:
Venetia":3159oio2 said:
Looking forward to your entry, EG :)

One note: When posting a link to your game, we won't want to download things, we'll be looking for a direct link to your uploaded HTML file. Your game will play within that HTML file.

1. How / Where do I do that?
The index file is needed. You also need Dropbox installed.

Once you get it and have uploaded your game to there, retrieve the download link for the index file. Then just post it in the topic, got it?
 
BlueScope":1f60ca97 said:
@AeroLowe: I'm not aware of a (classic) Mario or Sonic game that actually uses a zooming camera... but I would go with just scaling the layer/layout, which shouldn't need an additional player focussing, as everything in the center before will still be in the center. Needs about 1 event if you combine it with a global that stores the zoom factor.
Code:
# prepare for pseudo-code!

Set Global("ScaleFactor") = 1.0

SetLayoutZoom(Layout:"MapAndCharacters") = Global("ScaleFactor")
Oh, forgot what I said about zooming. I noticed I said my problem wrong. I need a close-up camera.

But your solution didn't really help me very much. It works fine (if noticeable at all unless I did it wrong), but I want it to be more of a close-up on the player and follow him throughout the layout, like in Mario or Sonic.
 
Eventing_Guy: After you export your project, open index.html with a text editor and put this under <script> (should be approximately 10 lines down from the top):

function log(){}

Then clear the cache in your browser and reload it.
 
@Aero: After looking into zooming yesterday myself, I didn't see a scale function at all... instead, it seems you have to work with size (unless I'm terribly unsmart about this).
In that case, what you would need to do is setting the layout/layer size equal to itself multiplied by the ScaleFactor. Problem with that is that I don't know off the top of my head if you can set the size of layouts/layers, so if you can't, this whole approach won't work...
 
Isn't there an event action for that?

If x happens - Stop Timer?

On the other hand, does anyone know how I can implement proximity detection in Construct 2?
I have enemies, and it's a platformer...
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top