signaljacker's Forum Posts

  • Hi, I'm trying to pick between two angles at random (-180 and 0), I don't wish to have any angles between these two just one or the other randomly picked. Could someone enlighten me on the correct syntax to achieve something like this?

    I've attached a link to a cap which demonstrates what I'm trying to achieve - when it's run it populates the ground area with a bunch of rectangles and randomizes their position and height, but they all face to a 0 degree angle and I would like to randomly alternate this between 0 and -180. Any help is much appreciated. Thanks!

    masspanicmusic.com/construct/randomangle.rar

  • I'm no expert, but this is how I would do it:

    masspanicmusic.com/construct/boxexplode.rar (CC r2 version)

    It was just made very quickly and roughly to demonstrate, if anyone else has a better method I would be interested as well.

  • Hi, I would probably do it like this:

    Select your player character and look at its properties.

    Add a private variable called "score", by default it should be a number and 0.

    Add a text box on another layer, name it and set that layer so that it doesn't scroll. This will be what displays your score.

    In your event sheet add a new system condition for "Always (every tick)" and then an action: select the text box, then select "set text" - the set text screen will come up as "" don't type anything in there yet, instead double click your player object, then "get private variable" - it will input something like player.Value('Variable name') - replace the 'Variable Name' with what you named your private variable before eg 'score' - keep the quotations. So now, every tick it will set the text box to whatever value the private variable 'score' is.

    So all you have to do now is add an action to whatever happens when you hit a coin - so on collision with player and coin add 1 to private variable 'score'

  • Yeah, I'm not sure why but it's a bit disorganized - I had to dig through the forum to find the latest version - anyway there's a link here sourceforge.net/projects/construct/files/construct/Classic/ConstructClassic_r2.exe/download

  • Hi, I'm not an expert by any means, so if anyone has a better way feel free to jump in. I thought your code looked a bit overcomplicated so I remade this the way I would do it (which probably isn't the best way either, but I find it easier to understand).

    One thing I noticed is that you had a lot of sub events, these behave differently to normal events (see construct wiki sourceforge.net/apps/mediawiki/construct/index.php I didn't think they were always necessary where you had used them and seemed to complicate things.

    Also, I noticed that some of your animations were set to loop (ie attack animation) when you would probably only really want it to play once.

    I've remade your .cap but left a few things out - like the hitbox as I wasn't sure how you wanted to implement it. I don't know if it fixes your problem, because it's structured differently and you may have structured it your way for a reason, but look at it as an alternative way to do things - and the animation for attack is now working.

    dl.dropbox.com/u/70305965/attack.zip - updated .cap - note your version of construct is older than mine, so you may need to dl a newer version to look at this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks shadowlord - that did the trick!

  • Hi, this is probably something really simple, but it's driving me mad. I have a sprite that will function as a sort of elevator that the player can jump into - it is using a collision mask so that the player can sit 'behind' some of the graphic but not fall through the floor. The problem is that I can't seem to get the player and the elevator to recognize a collision. If I remove the 'solid' attribute from the elevator then the collision registers, but it also renders my elevator useless. I'm sure it's something basic, but what am I doing wrong here?

    dl.dropbox.com/u/70305965/collisions.cap

  • Hi, I've created all my graphics at power of 2 sizes, but I've done extensive scale variations of these within Construct Classic. On my PC and graphics card it looks fine, but I tested on another and there were graphical errors. I assume this is because I'm scaling to non power of 2 sizes (even though source graphic is power of two). Is this bad practice? Would scaling say a 64x64 block down to 32x32 alleviate the problem rather than scaling it down to a random size like 57x57? I only ask because the scaling is a pretty good way to build variations using only one instance and it would be a shame not to be able to utilize this.

  • Hi, because you've got 'is moving' as a condition on the slide he won't slide unless he's moving. If you hold forward and down and press c it works, or if you take away the 'is moving' he performs the slide animation but doesn't go anywhere. Perhaps you could store the direction he's facing as a variable and then push him a few pixels in that direction when down + c is pressed. I dunno, I'm quite new to this as well so someone might have a better suggestion. Good luck though, game is coming along nicely.

  • Thank you. I discovered that I needed to put the wait object in a container with the spikes and it would work, but the For Each Object condition is very handy to know.

  • Hello - I'm trying to set up timed spikes, with a private variable as the delay time for each instance. My problem is that If I have multiple spikes on screen they all animate at the same time rather than to the time set by each private variable. They appear to just grab one of the private variables and apply that to the rest of the spikes. Perhaps there is something fundamental I am missing here, but I thought that the whole point of private variables was to add some distinction between instances that are essentially the same?

    <img src="http://www.masspanicmusic.com/stuff/spikes.jpg" border="0">

    .cap file here for anyone interested in taking a look

  • Thank you, that is much better!

  • Hello! I'm trying to set up a system whereby I can trigger doors to open when a character overlaps a corresponding plate on the ground. I've managed to set up a working version using private variables on the door and trigger sprites, but I'm wondering if there is a more elegant way to do this. I fear that if I wish to add many doors it may get messy. If any construct veterans would care to take a little look at my .cap and maybe give me some tips on how I could improve this functionality I would really appreciate it :)

    Cap here!

  • Hi there, I hope this isn't a stupid question. I'm working on a game with quite a few layers and objects and sometimes find that selecting and moving what I want is a little difficult in Construct. Is there an option that I have overlooked to 'group' objects together so that they can be moved as one (like in graphics programs such as Illustrator or Indesign)?

    I know you can shift click objects to move more than one, but I'm using a lot of normal maps so this doesn't really work well, neither does the click & drag method (buggy?). Anyway, if anyone can shed some light it would be much appreciated :)