philx's Forum Posts

  • Guizmus

    thank you for your quick answer. i can only imagine half of what you're saying but i'm pretty sure i'll get it when i download your sample capx at home.

    that switch kinda thing is also the most convenient solution i came up to.

    like

    on [all_players] destroyed

    • [all_players].number = 1 -> respawn this one
    • [all_players].number = 2 -> respawn this one
    • [all_players].number = 3 -> respawn this one

    where these are [families] and these - subEvents

    but my problem was, if i do it lile that, i couldn't get a timer to work, so that the player had to wait different amount of time until he resapwns.

    btw .. can i use the change od a value in an array for a trigger?

    for example if array.At(expressionForX, expressionForY) turns 0 -> then do this?

    it didnt work with "compare at xy" for me, even if i made it a sub event of every tick.

    does anybody know a workaround? because this will also solve the problem described above.

    thank you very much.

    cheers! phil

  • hey guys.

    i have a game with four players. each of the four character sprites has an instance variable called "player" where the value for the player number is stored.

    now i want to respawn them after they died.

    and i need something like

    spawner -> spawn object with instance variable = 2

    i have tried it with adding more conditions like

    "character.player = 1" where character is a family ..

    i have tried every combination of sub-events and conditions.

    the only way to work around would be to have the same sprite for every player but with 4 different animations, just playing the one according to what kind od character he is. but that would mean i had to restructure lots of parts of the game.

    a veeeeery simple solution would be to spawn objects by name. then i could use expressions like

    spawner -> spawn Object named ("player" & character.player)

    but i already suggested placeholders (or wildcards) to scirra and the won't implement it.

    can i somehow enter a name instead of choosing a sprite with the .. spawn another object.. .?

    im afraid i cant provide a screenshot or a capx because im on my ipad at work.

    but i will this evening if needed.

  • of course you can use an array instead of all these instance variables.

    depending on what you plan to do with your weapons further in the game this would even be better. for example if you have different stats for reloading time, recoil, firerate and so on ..

    i can show you how to do it with arrays aswell.

  • i would do it with families and instance variables.

    put all weapons into one family called all_weapons i.e and give them a family instance variable called "ID" or something like this. Make a family for the slots too. -> all_slots. with instance variables "number" 1 and 2.

    give the player instance variables like "weaponsEquipted1" & 2.

    give the family all_weapons drag&drop behaviour.

    then do somethin like this:

    "all_weapons" On overlapping "all_slots"

    -> Set value "weaponsEquipted"&"all_slots.number" to all_weapons.ID

    and then if 1 or 2 are pressed:

    on 1 key pressed

    ---compare instance variable all_weapons.ID = weaponsEquipted1 (this is a subevent)

    -> set all_weapons position to player at image point whatever ...

    -> set drag'n'drop of all_weapons to disabled

    -> set position of all_weapons to itemslot1.X,itemslot1.Y

    so the player won't be able to remove them by accident if they are selected.

    i can send you a capx this evening if you don't get it. or send me your's and i'll show you what i mean.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i think i might was mistaken with this one. i tried it with an older, stable version and it was still the same, so i guess it's my fault of missunderstanding.

    im sorry.

  • Link to .capx file (required!):

    drive.google.com/file/d/0B9IR6fhnjEUvSVlOSmVQRTBCa1E/edit

    Steps to reproduce:

    1. open old .capx in R157

    2. try to delete an previously created instance variable

    3. try to refer to or compare an instance variable in the event sheet

    Observed result:

    instance variables are not listed

    Expected result:

    select my instance variable

    Browsers affected:

    Chrome: no

    Firefox: no

    Internet Explorer: no

    Operating system & service pack:

    windows 8.1 Pro

    Construct 2 version:

        beta release 157

  • start with the scirra free bundle or look for other royalty free sprite packs in the internet.

    As long as you don't publish it, you can even use things like the sprites of Super Mario or whatever you want.

  • gfigueroa allright, i hope i can help you then.

    ok. i think im going for 16:10 (1280x800) for Android and 4:3 (2048x1536) for iOS.

    Im afraid i haven't played around with the sound fx yet. but i read alot about troubles with cocoonjs and the game's sound.

  • gfigueroa

    can you somehow put the randomly created spiders in a family and then make the events for that family?

    i can't really help you more unless you provide a screenshot of your events or a capx.

    since you want to port to a mobile platform aswell (like me) i have a question .. what screen size did you focus? or what aspect ratio and what scale method did you use?

  • hi gfigueroa

    check out the following topic where i talk a bit about multiple touch inputs and I also provide an example.

    Topic

    Live Demo (obviously try on a touch device)

    CAPX of the Demo

  • well, it is once more impressive to see what the C2 Community is capable of :0

    Very nice job!

  • yeah, i was thinking of something like this too but then i got worried about the hitbox/Collision Mask of my player model. i would have to leave transparant space and make the sprite bigger than it actually is and change the collision mask for every frame and i'm always a bit concerned about performance.

    the problem is, i can't really show you "my jellyfish" because my artists are damn lazy and want to get on with the game .. but thank's for your idea. i will try both ways and if I need further information/help, I'd contact you.

    Windwalker

    that's exactly what i was looking for. thank you very much!

    I'll compare performance and stability of both methods if i have enough time.

  • website is still down, are these assets somehow available?

  • thanks for the hint. could you provide a preview of the subscriber only package?

  • I have barely seen better games than this on windows store ;) :D

    but i was very impressed by a few windows exclusive titles lol ..