philx's Recent Forum Activity

  • + i need to know too

  • LittleStain

    the initial state is enabled, theres no acceleration and theres no other event that is changing anything for this value.

    the only special thing about it, is that there is a family instance variable expression in it.

    on start of layout -> all_chars -> set bullet speed to engine.At(all_chars, 7)

    all_chars is a family because i use this one event to assign values for every character.

    but i dont think this is the problem because if i do "every" tick, its working

  • hey guys!

    in my game, there are multiple rounds. and between every round, the player goes to another layout where he can improve his stats, these are then saved into a global array and if he presses "ready" he goes back to the first layout.

    now i want to set for example the bullet speed (of the Behaviour) to the value fornthe expression array.At(2,5).

    if i do it with

    on start of layout -> set player bullet speed to array.At(2,5)

    the bullet speed instatnly changes back, like it changed just for the exact moment when the layout started and then turned back.

    if i do this with "every tick" it works, but im not a fan of "every tick" especially because this is gonna be a mobile device game.

    is there a way to override the value for bullet speed for example with an expression?

    thanks in advance!

    cheers, phil

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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?

philx's avatar

philx

Member since 27 Jan, 2013

None one is following philx yet!

Connect with philx

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Teacher One of your tutorials has over 100,000 readers
  • Email Verified

Progress

15/44
How to earn trophies