Having trouble understanding and creating events

This forum is currently in read-only mode.
From the Asset Store
14 amazing sound files of game events like Level Ups, Level Completes, object spawn, object taking etc.
  • For the past couple of weeks I've been attempting to work on a short game as a surprise for my girlfriend's birthday/Christmas, with the intention of using Super Mario gameplay and mechanics(ie powerups, world map, even some simple* cutscene and bosses. While I have the capability of spriting and composing music for this game, I've found I hit some roadblocks in using CC.

    I will say that I did indeed follow the Ghost Shooter tutorial and the currently released Platform School tutorials, and that I find Construct is already easier to grasp then the likes of GameMaker, especially thanks to aspects such as the Platformer option. And not being very experienced with programming from code at all, I should be relieved that the events system is in place to do all that. However, I'm having a hard time grasping some of the technical aspects of it.

    As far as I can understand, the events system at simplest runs on logic: For instance, if you wanted x get hurt by an y, you would have to create an event where x collides with y, and the resulting action being x powers down, takes damage, etc. Of course, it probably isn't that simple, as you'd have to factor in where y can be hit by x to destroy y, and other, more complicated actions and events.

    This is where my problem comes in: I don't quite understand how to put a number of events/an event together, especially when creating one without aid. I've sifted through some tutorials on the site, but it's frustrating to think I've found a tutorial only to find that it's for Construct 2 or some such(And don't get me started on YouTube and all the Spanish Construct vids...). As I've said, I've never been very proficient in any sort of programming, but I would really love to learn, and especially get something done for my beloved!

    I've had some other little troubles with the program, but I believe this is my biggest one. Hopefully I've posted this in the right section, and that I'm not just adding to a waste of other miscellaneous posts. I'm just a tad desperate is all, in the wake of school and such. I hope you guys can help me out!

    *Obviously having never done anything like this I wouldn't really no if there IS a simple way to do it.

  • Hi StarvingGecko! Hmm, you might find these step-by-step guides helpful for eventing:

    Construct Game Development: Beginner's Guide (Chapter 2)

    And this article has another sample from the book which might help too:

    2D Shooter/Platformer chapter sample

    However, if you can give some examples of what you're stuck on I might be able to help you out <img src="smileys/smiley1.gif" border="0" align="middle">

  • Hi StarvingGecko! Hmm, you might find these step-by-step guides helpful for eventing:

    http://www.packtpub.com/sites/default/files/9781849516600-Chapter-02-Hello-World%21-Construct-Style.pdf?utm_source=packtpub&utm_medium=free&utm_campaign=pdf

    However, if you can give some examples of what you're stuck on I might be able to help you out <img src="smileys/smiley1.gif" border="0" align="middle" />

    Woah, thank you for these useful tutorials! I'm sure these will prove useful, though I'll have to go through them all in detail first. :P

    I have a few event quibbles that I may solve once I get into it a bit more, but are there any tutorials or such that covers transformations ala Mario->SuperMario->Fire/Raccoon/Etc.? Hopefully you won't mind me asking more questions like this in the future.

    (Also, does the Construct book go on sale around the holidays? Because I'm interested but my mother is a bit worried with the material book's price, and I'm not fond of e-books so...)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No problem =) and ah I'm not sure but it sounds like changing animation and a variable will be easier than changing sprite/object there. And it's great to ask questions! <img src="smileys/smiley4.gif" border="0" align="middle" />

    As for the book, I'm not sure about holiday sales but I'll let you know if my publisher runs any deals.

  • Alright, here is a question: Aside from trying to figure out how to properly integrate the concept of suits with different abilities and such(flying, better swimming, projectiles, etc. By the way, the Platform School should really release that swimming tutorial) , I'm trying to figure out how you can defeat an enemy by stomping on it, instead of being damaged by it at all times. Would this mean I would need to separate the entities(head, legs) into their own objects, give them different variables and events, somehow reassemble them, and go on from there? (Knowing my luck, this is noted in one of those tutorials you posted, but I've been a tad busy at the moment...)

    I've been going for a NES/SNES sprited feel, so I'm wondering if it's possible to do this without jarring the effect too much. That, and if this is a tad bit complicated for such an action. :B

  • Hmm, sounds like an easier way is to compare Y positions on collision.

    Assuming you have the hotspot of each object set to the bottom middle (numpad 5 while placing one), you'd have main event "On collision" and then these sub events:

    -Player.Y less than (Enemy.Y - Enemy.Height) -> [Player kills enemy actions]

    -Player.Y greater than (Enemy.Y - Enemy.Height) -> [Enemy hurts player actions]

  • Hmm, sounds like an easier way is to compare Y positions on collision.

    Assuming you have the hotspot of each object set to the bottom middle (numpad 5 while placing one), you'd have main event "On collision" and then these sub events:

    -Player.Y less than (Enemy.Y - Enemy.Height) -> [Player kills enemy actions]

    -Player.Y greater than (Enemy.Y - Enemy.Height) -> [Enemy hurts player actions]

    You kinda' lost me with the hotspot thing(also, I don't have a numbpad for my laptop :'D)

    img845.imageshack.us/img845/5219/ccsa.png

    So, erm, I don't think I put these events together right. This was just my test stuff, but things got crazy after I started to attempt to implement the event.

  • Ah I notice you use a check on Sprite height, but that's a constant size of the image rather than position. Also, I notice you use exact Y positions, fine for testing but if you want it to work in every case you should be able to use the (Enemy.Y - Enemy.Height) conditions I mentioned.

    As for hotspots, in the sprite editor you can click the red target icon to place them. They are used as the "origin" of a sprite from a X and Y position view.

    For example, an object with a hotspot in the bottom middle when placed at X and Y 0,0 will be halfway into the level, and entirely above it. This is a little hard for me to explain without more images, so you might need to play with it a bit more.

  • Hi StarvingGecko, finally had a chance to put a cap together, is this what you're going for? https://dl.dropbox.com/u/4714446/MarioStyle.cap

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)