GuttyKreum's Recent Forum Activity

  • So how to you check the nearby tiles to see if their doors match up?

    Something like:

    Array.At(x+1,y) > contains('t') or contains('r') ... etc. ?

    When checking the arrays for which door they contain I chose not to use strings or characters to label the types of rooms.

    Instead the room configurations have an identity by number (1-15). I'll include the diagram (it's not sorted, but it's labeled)

    I felt that numbers and characters would probably have worked the same; thinking that using comparisons between integers would be faster than comparing characters.

  • How exactly do you determine which sides have doors?

    The sprites for each room have green sides to represent a door or doors and are named appropriately.

    For example:

    That sprite is named 'tr' to show that it has a door on the top and right.

  • Heya guys,

    I'm having some problems randomly generating sprites.

    The goal of the event system is to populate the layout with randomly generated square sprites which represent rooms with doors on either side.

    The array "RoomFormation" represents the population of possible room combinations. Green sides represent doors where the object is named after the orientation of the doors (t=top, r=right, b=bottom, l=left).

    The size of "RoomFormation" is 16x5 where there are 16 different sprite objects (x-axis), the name of the sprite object (y-axis=0), and the possible relative locations where the sprite can be placed (x.1, x.2, x.3, x.4 where the 1 refers to placement in the north, 2 is east, 3 is south, and 4 is west; i.e a "1.3 means a 't' tile placed in the south.)

    Theory:

    The function "TileRoll" goes through a process of scanning the "Grid" array for previously placed tiles and eliminates (zeroes the value) incompatible tile objects from "TilePool" (a copy of "RoomFormation"), then it draws a random value from "TileLottery" (a contracted "TilePool" array containing no zero values), from the randomly chosen value a tile is placed in the appropriate location.

    [

    [The "TileRoll" function is made in such a way to prevent 3-way intersections from occuring randomly]]

    Problem:

    Randomly, the process halts before MaxRoom tiles are placed.

    In the time being I've added the highlighted condition in Event2-3 to restart if the process fails, however this is not something I want to keep in.

    Screenshot examples of successful and failure layout generation:

    http://imgur.com/a/5Wyv3

    Cap file itself:

    https://www.dropbox.com/s/u1zjtvg31mbp2 ... .capx?dl=0

  • I totally dig what you're doing. Looks great, I like the style and I actually love the lack of background. If you do add any background images in certain areas they will stand out even more.

  • Testing out a new spell. You can hold down the attack key to charge up (drains more magic points):

    (gif quality settings mess with the purple spell color )

  • varr that's pretty cool. When the foreground overlaps the player, does the entire foreground fadeout, or just that particular piece?

    Thanks! Currently it's only whatever sprite in the foreground that you're overlapping. I can see that being frustrating depending on the area layouts when engaging with enemies so I may change it to make all objects in the foreground transparent when you overlap any.

    Cool work on the Mario inspired enemy interaction and block breaking!

  • Took some inspiration from the classic Zelda series for the gliding chicken available in this particular town.

  • I did not know that. Thanks!

    I also solved the issue by replacing the len events with Spritefontdisplay comparing its own text value. I am still not sure what caused the initial issue though.

  • I recently switched over to using Sprite Fonts from Text objects and am working on transitioning the events to reflect this. The following events worked perfectly fine when using Text objects but when I switched over to Sprite Fonts it seems that the len(SpriteFontSource.Floodedshrinestatue1) never equals len(Spritefontdisplay.text).

    It works up until event 2033 and I can't figure out why the issue is occurring.

  • You're right with your assumptions (I am a noob). I have been using Construct 2 on and off for a year and I have just discovered the use of Families. I also just finished changing all of the code over for the enemies to make use of the Family and it all works smoothly, Thanks!

  • I have the following example for when a specific monster is hit:

    I have separate events like those pictured above for each monster sprite in the game. Is there any way to do the above using Families in order to lessen the amount of code?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I apologize. I should have paid more attention to what I was writing.

    I have now created a family instance variable called 'FamilyOnhit' and changed it so that every monster has an event that triggers on 'FamilyOnhit' = 1 rather than using their own individual instance variable called 'Onhit'.

    When a bullet collides with the Enemies family it sets FamilyOnhit to 1 and affects every monster not just the one that was hit. How would I change the code to have it only trigger an event for the specific monster that was hit? How would I subtract from the 'hp' instance variable of a sprite called 'mushroom' (which is part of the Enemies family) using the an event regarding the bullet colliding with the Enemies family?

    If I code:

    Bullet on collision with (family)Enemies: Subtract 1 from mushroom.hp

    It will trigger that event when the bullet collides with any sprite that belongs to the Enemies family.

GuttyKreum's avatar

GuttyKreum

Member since 15 Feb, 2010

None one is following GuttyKreum yet!

Connect with GuttyKreum

Trophy Case

  • 14-Year Club
  • Entrepreneur Sold something in the asset store
  • Email Verified

Progress

16/44
How to earn trophies