ezrubiera's Recent Forum Activity

  • Hi,

    I am having a problem with an enemy. It is a stupid problem, but I dont know why is happening. This enemy has platform behaviour, and he can walk on the floor, and also he can invert his height to walk on the roof. The problem is when he is patrolling and he has wall to his sides, he doesnt mirror.

    On the floor it works fine, but when he is up, seems like he is not detecting the walls. Why is this happening?

    the pseudocode is:

    if(enemy is mirrored)

    ----- Simulate press left

    ----- if(enemy has wall to left)

    ---------- enemy set not mirrored

    else

    ----- Simulate press right

    ----- if(enemy has wall to right)

    ---------- enemy set mirrored

    This works fine on the floor, but no when the height is negative. I tried to change the mirror just in case construct detect the negative height as mirrored, but that iks not the problem.

  • Hi,

    recently I found a problem with my project. Everything works fine in the preview mode but when I export my project to NW.js target, it exports it right, but when I open the .exe, the screen just stands black, like this:

    Then I go back to Construct 2 and run the preview mode in the same layout than before, and this error apears:

    It is the same layout that was working fine before. I don't know what to do. If anyone can help, I will appreciate it. Thanks in advance.

  • It is just great, but I need to know how can I access the actual source color of a sprite to interpolate it between the source and the target, something like:

    set effect parameter(0) to lerp(self.effect(ReplaceColor).RSource, self.effect(ReplaceColor).RTarget, time)

  • you could set a parameter to the bullet.uid when calling the function and use a pick by uid condition..

    I think this is the best solution, simple and it should work fine.

    if(bullet collides wall)

    . .call funtion "destroy_bullet"(bullet.UID)

    On function "destroy_bullet"

    . .Bullet.Pick_instance _by_ID (Param(0))

    . .bullet.destroy;

    . .create object(particles at bullet.position)

  • I guess u want to use physics behaviour. Try to disable the platform behaviour of the player and increase the elasticity. Try and tell if u want something like that. Of course, disable the line that says set Vector Y -500

  • For each lever save the UIDs of the doors you want to manipulate, so when u interact, u can access the specific doors u want to use.

  • Hello,

    I dont know if I have to post here this, but I suppose I am doing something wrong.

    I have 2 global objects (9-patch and text) that are always on screen with opacity 0 in a UI layer. When I have to display some text I set its opacity to 100 and show the text. This objects are created in the first layout, and its layer (UI) is also global, to override it every layout.

    The problem is that every new layout, a new instance of both objects are created, so I lose the reference to the first object IID. And I only want one copy of them.

    Why is this happening?

    Edit:

    I have just tried to turn UI layer to "no global", and seems to work fine. So, my question now is, a global layer, duplicates its content every layout?

    Edit 2:

    Ok, I think i figured it out how it works.

    -A global layer with "no global" objects, destroy its objects at the end of a layout and create new ones with new UIDs at the start of the next layout

    • A global object, persist with the same UID between layouts
    • A global object in a global layer persist between layouts with the same UID and also, a new instance of the same global object is created because of the global layer. Is this correct?
  • ^^ it worked. I feel so stupid now. I was looking for something like that in preferences tab, but I guess I am blind when I have a problem. Thank u very much

  • Problem Description

    New event window is not displayed

    Attach a Capx

    happens with all capx

    Description of Capx

    none, happens with all capx

    Steps to Reproduce Bug

    • Open any project (also a new one)
    • Go to Event sheet
    • Add new Event or codition

    Observed Result

    New event or codition window is not displayed

    Expected Result

    See the new event dialog

    Affected Browsers

    • Chrome: no
    • FireFox: no
    • Internet Explorer: no

    Operating System and Service Pack

    Windows 10 - 64 bits

    Construct 2 Version ID

    r239

    Other considerations

    I don't know if the dialog is displayed or not, maybe is hidden outside the screen (weird) but I can't see it. The program does not stops. I can press ESC to close the "invisible" dialog and go on. I can play the game in the browser and change variable values. This only happens with the new events dialog.

    So, the windows is not displayed or I can't see it because it is created outside the screen.

  • Try Construct 3

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

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

    > > You can turn your Rooms into global objects, you do this in the properties panel, top left corner. Then they will be available in all your layouts.

    > >

    >

    > Oh! I have to try that. I guess the UIDs are saved between the layouts, so I can access every object with the same UID through the rooms. Thank you, I will reply when I try it. Thanks in advance ^^

    >

    Yeah its the same object from once its created with all settings etc.

    Mate, it worked perfectly! thanks a lot

  • You can turn your Rooms into global objects, you do this in the properties panel, top left corner. Then they will be available in all your layouts.

    Oh! I have to try that. I guess the UIDs are saved between the layouts, so I can access every object with the same UID through the rooms. Thank you, I will reply when I try it. Thanks in advance ^^

  • Yes, that is the main problem, I store the UIDs but in the next layout they are useless. So how can I save the information of that objects between layouts? If I generate a 2 dimension array of rooms, I can store the information in the 3rd dimension of the array for each room, but if I have a 3 dimension array of rooms, I dont know how to store its information. I can use a lot of arrays for each variable but is kinda messy. So I need a workaround to solve this: store the information (intance variables) for X x Y x Z rooms. D:

ezrubiera's avatar

ezrubiera

Member since 25 Nov, 2012

None one is following ezrubiera yet!

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies