mrmlabs's Recent Forum Activity

  • In the sounds folder i have the following structure:

    Sounds/player_1/[all the sound files]

    Sounds/player_2/[all the sound files]

    When the user selects the character they want to play with i set a global variable to either 1 or 2

    How do i then in my event sheet play the sounds for that specific selection.

    For example:

    at game over, if the character selected is player_1...i want to play the sounds located at Sounds/player_1/gameover.wav

    Any help would be greatly appreciated.

    Thank you.

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Im just going to jump in here as its related:

    So at the moment i have a family object called "player" in wich i have 2 sprite objects "player_1" and "player_2"

    "player_1" inside the family has an instance variable - selected_player = 1

    "player_2" inside the family has an instance variable - selected_player = 2

    The family itself doesnt have an instance variable set - as i dont know if the individual object from the family needs to have the instace varibale or the family itself.

    I also have a global variable called selected_player = 0

    When you select player1 from the character selection layout i set that variable to 1 or 2 based on the selection.

    At the start of the game layout i create the player object and place it at specific coordinates.

    So the question is, how do i get player_1 or player_2 to appear based on that global variable.

    Hope it makes sense.

    At the moment they show up randomly.

    Thank you so much!

  • You can use "Create object named…" and then call System > Pick last created object from Family

    Excerpt from my project to create background "on the fly“ :

    Sorry Nikolas , you were probably answering Lucky's question.

    So sorry again for jumping on this question as i thought its very similar to my problem.

  • You can use "Create object named…" and then call System > Pick last created object from Family

    Excerpt from my project to create background "on the fly“ :

    Not sure that answers my question.

    So at the moment i have a family object called "player" in wich i have 2 sprite objects "player_1" and "player_2"

    "player_1" inside the family has an instance variable - selected_player = 1

    "player_2" inside the family has an instance variable - selected_player = 2

    The family itself doesnt have an instance variable set - as i dont know if the individual object from the family needs to have the instace varibale or the family itself.

    I also have a global variable called selected_player = 0

    When you select player1 from the character selection layout i set that variable to 1 or 2 based on the selection.

    At the start of the game layout i create the player object and place it at specific coordinates.

    So the question is, how do i get player_1 or player_2 to appear based on that global variable.

    Hope it makes sense.

    At the moment they show up randomly.

    Thank you so much!

  • oosyrag - Amazing explanation. Thank you so much.

    Can you tell me a bit more on how i do this:

    "Then you can use the family - compare instance variable = global variable, it will pick the chosen object."

    Thank you!

  • im also interested in this as i recently switched to families and i have problems understanding how it all works.

    I have a character selection layout from which you select the game character you want to play with.

    before i added both characters (sprite objects) in the "player" family, i used to have separate event sheets and layouts for each, and in each event sheet i had all the events on that sprite object (jumping, shooting...etc)

    What i want now si that once i select the character i want to play with between the two, to only have to apply all the events and actions i had before on the individual object to be applied on the selected family object.

    How is that possible.

    I created a global variable called player which is 0 initially and when you select a character it either gets the value 1 or 2.

    And then i want a specific object from the family to be used when the family is referenced in all the evenst and actions.

  • I have a character running in the game and i want to trigger some sounds while he is running at random times, taking into account this is an endless running game.

    Can someone help?

    Thank you.

    Tagged:

  • Maybe some sort of shield around the character? Can anyone help with some examples?

  • Hi guys,

    Alex here again :)

    I have a game character as a sprite with multiple animations within (animation for running, jumping...etc - each with 6-9 frames).

    While running through the game, i collect some object that give the character invincibility. This works fine.

    I want the character to get a glowing border around it while invincible, but i want to do this without having to change the frames in the animations (so without adding new animations) as i want a really nice glow. I know it will probably have to use opengl...or maybe not....not sure.

    Ive gone through the list of effects and cannot find anything that creates a border around the character and makes it glow.

    Can you guys help me with some tips on how to do that? maybe a combination if effects? or maybe an add-on?

    Thank you.

    Tagged:

  • You cannot wait before requesting fullscreen. It only works when used immediately in a user input event with no waiting.

    Indeed that was the issue :) You cannot use system wait before requesting full screen.

    Thank you Ashley

  • Hi guys,

    I really need some help here.

    I have the following:

    However the full screen request never happens on any mobile browser. Tested on Chrome, Firefox and Safari - all latest versions.

    It works on desktop browsers.

    Any idea how do i get the game to run on full screen? Also is there any way i can turn the canvas to landscape?

    The game will not be in an app, but on a website, thought i clarify that.

    The game settings are:

    Thank you so much,

    Alex

  • You do not have permission to view this post

mrmlabs's avatar

mrmlabs

Member since 4 Mar, 2019

None one is following mrmlabs yet!

Trophy Case

  • 5-Year Club
  • Email Verified

Progress

6/44
How to earn trophies