emoaeden's Forum Posts

  • So I'm making a Sim City style game, and I've gotten stuck on this part.

    Essentially what needs to happen is that when the power lines are connected to the blue block (power plant) they will cascade down the line to give a value of 1 or On to each of the subsequent power lines along the way. I've tried six ways from Sunday, and still can't seem to get it right. In each test, the power line seems to inherit the value from the surrounding ones, which is fine, but when I bulldoze the middle of a power line set it still retains the previous value and doesn't give a new value to all unconnected power lines (ideally a value of 0 or Off)

    Can someone please take a look and see if you can solve it, as it's the only thing holding up further production of the game :'(

  • Well, giving it the limitations (round(random(1,2))) will do that, as you're only letting it have one number and that is 1. Try making it (round(random(0,10)))

  • Why not tell it to pick random array and if value = 0, replace with 1, else pick another one ?

  • I agree, an array with all the items you've made would be best, and as for creating the items, you may need to have to have a large volume of code due to the nature of the game sadly.

  • May I ask why you're using webstorage for the control of the music/sound ?

  • First off, there were numerous issues with your layout. Not least you had the stretched the size of the inv sprite, and assigned imagepoints that were not only too close to one another so that when the select sprite was over one weapon it was over another, but when it was stretched it was on a decimal X,Y position (i.e. 302.5, 272.5)

    I have modified it so that the spacing is sufficient for you and that you can easily change it by altering a few numbers in the move inside inv group. I have also renamed your mono spites animations so it will allow the game to flow nicer, given the way in which animations are selected, and finally I have cleaned things up a bit, but not to a degree where the changes made will confuse you too much.

    https://dl.dropboxusercontent.com/u/108 ... eapon.capx

    P.S. I didnt' need to use Regex magic given what I did.

  • Realistically what you have is alright, but I'm thinking a bit of Regex magic might be in order, I'll have a shot and pop up a CAPX as soon as I'm done

  • Set one, then do Copy paste, it will retain all the values of the original.

    Failing that, no

  • Of course there is. You could tell the game if sprite.x/sprite.y is between X & Y then set size to 2, else set size to 1

  • Have you looked into the Physics object yet ?

  • I have, yes.

    I've just been playing with it for the last hour, now have it all working (I think) except for Line 18 & 19. It seems that on creation of Peer, it assigns one of the Host players to the Peer, but allows it to be controlled by both Peer and Host. And the two characters in the bottom right that are meant to be controlled by the Peer, are controllable by neither Peer or Host.

  • I believe you may be correct. You could look into posting a suggestion for this, if it is supported and not coded, or just wait for the next cocconjs update which would hopefully do so.

  • Can you post up a CAPX of how it's misbehaving and I can take a look.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you a CAPX I can look at ?