Xocolade's Forum Posts

  • It works well , there is just one small problem : With this method , i cannot put any layer below the map . That means i cannot use the window frame from before .

    It's not a big deal, but i would like to have the window frame below the map.

  • Thanks for the response , but it didn't work very well . The background went black and the zoom is bugged .

    Here's the altered capx : dropbox.com/s/g8knckvs2u33piy/alteredsample.capx

  • PS : Here's a sample capx (please test in different browsers):

    dropbox.com/s/dqpbrfv22cl8cwk/sample.capx

  • Hello . I'm trying to make a combat board for an RPG game that can be moved around and resized .

    Since the board needs to be contained within a certain portion of the screen , i'm using a calculation with CanvasToLayerX to pin a sprite to a certain position . This sprite acts as a mask that stops the grid from getting out of it ( using the "source atop" effect ) .

    In the pictures below , the grid is represented as the big red sprite .

    In Firefox , Edge and NW , the mask pins to the exact position . However , in Chrome , the mask pins slighty more to the left for some reason . Here are some prints :

    Edge

    Firefox

    NW

    Chrome

    The zoom % alters the scale of the layer .

    Since the mask needs to be in the same layer as the grid for the effects to work , it means it is also affected by the scaling . For that , it's size compensates for the scale so it remains constant .

    And for the position , i use these calculations :

    (spr_combatbackground is the background window the mask is supposed to be contained in)

    Why is this happening only on Chrome ?

    Is there any better way to do what i am doing ?

    Thanks in advance

  • With events. I got it working with families. Thanks

  • I'm trying to acess all objects within a layer , and change their position .

    It would be something like :

    "For each object in layer : object.X = object.X -1"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks!

    By the way, do these layer functions still work ? scirra.com/manual/28/layer

    I didn't find a way to acess the ".instances[]" function.

  • I've been messing with effects and blend modes recently .

    By adding the "source atop" blend mode on an object that is above another one , i get this result ( which is correct ) :

    By adding the "source atop" on the layer that contains both objects (and setting the blend mode of both objects to normal) , i get this (nothing) :

    My question is : Why changing the blend mode of the layer did nothing to the objects ? How do blend modes work specifically on layers ? I've searched online , but i didn't find any specific description of how blend modes work in layers .

    Thanks in advance .

  • That's nice , but i would like my game to have a room list , showing all available rooms the player can join .

    If i did what you said , the players would aways know the password of the room .

    Still , it's a nice possibility i didn't even think of .

  • My problem is : I want every room to have a variable called "password" .

    Anyone that tries to enter the online room will have to type the password in a text box .

    If the text typed is equal to the password of the room they are trying to get into , they will connect to the room .

    I didn't find a way to create instance variables for multiplayer rooms .

    How do i do that ?

    Thanks in advance .

  • Thank you all very much , it worked :) .

  • Is there any way i can check if a certain sprite has an origin point which has the same name as something else ? ( basically , compare the name of an origin point )

    Ex :

    - If Object Sprite has an origin point named "Test" :

    return true

    else

    return false

    end

    Tagged:

  • Really great plugin !

    Thanks for sharing :D

  • Thank you all so much , i was able to fix the problem . I simply remade the system using 3D arrays . It's much easier that way , and it's working really well .

  • After some testing , i can say that this problem is occurring because there is no time for the system to get the keys , and also because i am not very good at loops in Construct 2 .

    This pic below demonstrates a test i tried to make.

    What i want the loop to do , is to wait one second , set the text to the loopindex , and then repeat 23 more times . So the text should be :

    0 - ( 1s pause ) - 1 - ( 1s pause ) - 2 - ( 1s pause ) - 3 ( 1s pause ) - 4 ( 1s pause ) - 5 , etc ..

    Instead , there is just a 1s pause at the begginning of the layout and the text is set to -1 ( indicating the loop is over ) .

    Basically , the loop is just repeating 24 times in the first second of the layout , and completely disregards the 1s wait action .