silkc2's Forum Posts

  • I'm having real headaches figuring out how to make a "single code base" for PC and mobile games. If you move stuff about on startup (to fit a mobile screen) then you are screwed the second anyone resizes a browser window running it on PC.

  • Hiya

    I can't get something simple to work.

    I want to destroy an instance, then immediately check and do other tidy-ups if there are none of the objects left now.

    After destroying the object, the rest of my function seems to act like I have not actually destroyed the object.

    <img src="http://i.imgur.com/O3BBZHB.png" border="0" />

    It's causing me so many headaches. It's looking like I'd have to write a new function to "tidy up" on next tick which is horrible and dirty.

    Why does it work like this, surely I should be able to , in one function, add/destroy objects and do things as a result of that action.

  • I'm also looking for this, it seems pointless to have the other anchor options without the ability to set my main game window to the middle (I don't want it to change size, would affect gameplacy).

  • Right fair enough, just checking.

    I take it one must use cocoon for both android and IOS in that case?

  • Hmmm.. I really don't want to use remote storage. It's offline play.

    I realise "purchased upgrades" might sound like I meant micro transactions, I didn't mean that, just in-game upgrades like getting a new plant in plants vs zombies.

  • Hiya

    I have serious intentions to publish a game on IOS and Android.

    Before I go down that route I need to clarify some things regarding storage.

    Is WebStorage OK to use on both platforms? I see plenty of info about it working for cocoonJS but what about appMobi (which I believe you have to use for IOS)?

    I need to save "level progress" and "purchased upgrades", quite small settings. But I want confidence they'll be saved and not randomly lost somehow.

  • Aha found a tutorial at last. Yes this should be stickied. :)

  • Ah man, I was so close!

    I knew collisions were messing it up, only found out how to turn those off yesterday. Also your ordering makes more sense so I've made very similar changes.

    All working, hoorah! Thanks for all your help. :)

    The picking still confuses me as I feel it's contradictory. But hopefully it'll click into place the more I work with c2.

    I would be interested in making this rope bridge object as a plugin for the community, don't suppose you have any tips on where to start? I've seen the SDK area but could use an example "create a simple object" tutorial and can't find one.

  • I'm starting to think you are the forum superstar here! I'll give those a try, thanks. :)

    Have gone with option 1, makes more sense. :)

  • Latest version is up. It seems to sort of be getting there but it goes all screwy.

    dl.dropbox.com/u/116137178/GamesDev/Bridge3/Bridge3.capx

    Also of interest, when I did this

    "Pick all peg"

    "Pick source peg"

    it worked

    But then followed directly with

    "Pick all peg"

    "Pick dest peg"

    .. dest peg wasn't found, in fact only finds it without "pick all". Can't get my head around that one.

  • Hi all!

    Hope you can help, having lots of fun on a game I can't wait to show you but right now I'm a bit stumped.

    When I have more than one enemy hit by touch, then they each take damage and "die" correctly, but the associated health bars don't all get picked up. Only one does.

    <img src="http://i.imgur.com/6HcRYAO.png" border="0" />

    I can't figure out what do to.. Are any of the following possible?

    1, Prevent touch/click hitting multiple overlapped family objects (so, only hit the top one..)

    or

    2, How to fix the issue with "only one" health bar being found in the for loop, even though multiple "Prey" are picked.

    or

    3, How to assign health bars to family at run time via a family container (then hp bars would destroy with enemies). Don't think this is possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah you are right, still getting my head around why some conditions pick and some do not.

    Fixed it using a foreach to get the health bar pinned to enemy (matching on Healthbar.Pin.PinnedID = Enemy.UID).

    Would be interested in knowing if there is a way to put containers on families though.

  • Yeah that is what I am doing, but that leaves me with cleaning up the health bar object manually which isn't working (see point 2).

  • Hiya

    1, I have an enemy family with many different enemies in it.

    2, I want each enemy to spawn a health bar at run time.

    3, I want the health bar to vanish along with when the enemy is destroyed.

    As far I can see, c2 supports bits of but not all of the above at once.. i.e. I can..

    1, Use a container to bind one health bar to one enemy type (not a family). Ideally I'd be able to bind objects together in containers at run time but can't see a way to do this.

    or

    2, Use pegging to peg health bars to enemies at run time but then have another issue:

    "Event" EnemyFamily.Health<= 0

       "Subevent"   EnemyFamily.SetAnimation (Dead) < nb. I don't destroy him yet

          "Sub-Subevent"   System HealthBar.Pin.PinnedUID = EnemyFamily.UID (HealthBar.destroy)

    This should look for the health bar associated to the enemy who's health just went to 0 but doesn't do anything.

  • Ah so "pick" is actually like a "filter" in the sense that if you filter more than once you are constantly working with a reduced set of objects.

    And that applies not only to the pick command but to any conditional checks which also select specific instances of objects.

    You've probably noticed I'm quite new to c2 ;)

    I'll have another stab at this and post an update later. Am engrossed in a second game right now.