faulknermano's Forum Posts

  • SOL mean Selected Object List, which is the list of picked instances. So it's not really related, but only the question if certain entities are really being evaluated based. Because it is an OR statement, like the thread I mentioned, I wondered if either the Touch or Keyboard was not being 'selected for evaluation' because it is one or the other.

    I don't know. The documentation refers to triggers as an example; it's almost as if it only applies to triggers, although it doesn't say it explicitly.

    Ashley, I was wondering if you (or anyone for that matter) could spare a brief moment to enlighten us poor souls why the OP's scenario doesn't work, and why my post (#2) behaves the way it does (i.e. it seems like when two plugins -- Keyboard and Touch -- are tested as True in an OR statement, only one of the plugins 'make it through' the sub-event in order to be evaluated). Would be much appreciated.

  • Yeah, that's weird. There are several forum threads like thisand this, but it doesn't seem to cover the behaviour of global plugins. I'm just speculating, but I wonder if the plugins have a 'priority' for checking a certain type.

    For example if we replace Keyboard | Space is down with Touch | Is touching Sprite:

    .. Then hold down the mouse button, go over the Sprite, it will be destroyed.

    However, Keyboard | Z is down doesn't work any more, but Touch | Is in touch works fine. It's almost like the plugin itself was 'picked' (like a SOL), but not really.

    As a workaround, you can separate the conditions.

    Of course, you could write it another way:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, you can turn off the backups.

    Go to Preferences > Backup > untick Auto-backup.

    You may want to also deactivate Autosave. Go to Preferences > Autosave > untick Enable autosave

    For some reason I'm having issues with saving, too, and it started just happening recently. There's a old thread about this, which I recently posted because I had problems, too.

    I don't know if my project would have saved after a certain number of hours because I wasn't willing to wait that long.

    In the thread I linked above, I first deactivated Auto-backup. But it wasn't enough because Autosave tried doing a back-up based on the frequency I had set it on. When Autosave kicked in, C2 was stuck again. Now I've taken off Autosave entirely and I've been working for about 2+ hours now we no issue so far. Hopefully it stays the same.

    There's a possibility it could be related to the newest build, but who knows?

  • Well, it turns out that no, disabling auto-backup did not actually remove the issue. I will now disable Auto-save and see if that helps. (I'm still suspecting the 'Auto' features. I have Auto-save set to 'Hourly', and I have just come back a little after an hour to save my project. The Auto-save will kick in if there's activity in C2, and it so happens that my first command was to save the project.)

    Ashley, I know that this is a highly irregular bug and it might be something to do with the file system (I've had my own code demons dealing with stuff like this). But in the hopes of finding a workaround to make the save function work reliably I took a screencap of the latest 'hang':

    On the status bar it stops at Saving project settings. I noticed that the uistate.xml was successful in saving the latest, but unfortunately, the .caproj did not save.

    Perhaps there is a workaround to bypass certain procedures and simply get on with saving the 'essential' stuff, like the events? It's just that I'm sometimes losing a lot of progress and it's quite unnerving to know that my previous successful save might be my last. FWIW, I'm using a local drive; I run as Administrator in my machine. Again, I am looking at disabling Auto-save, and hopefully that works. Thanks for reading.

    SecondDimension, now that you mention it, it does seem that it started happening when I upgraded from r250 to r256 recently. Of course, this has been happening before, but I concede that when it did happen I was also using cloud storage (both Dropbox and OneDrive in separate instances). And I don't recall this happening since I started this project last year, and I've been on r250 for a long time before upgrading. I don't mind downgrading, though I'll be darned if that's the reason.

    But like I said, I'll switch off Auto-save, and see what happens.

  • Not sure, but try enclosing parenthenses/brackets around

    personaje.tipoPersonaje & "coge"[/code:r0xphdy9]
    
    Ie:
    
    [code:r0xphdy9](personaje.AnimationName <> (personaje.tipoPersonaje & "coge") ) & (getbit(personaje.flagsRecibidas,5) =1 ) = 1[/code:r0xphdy9]
  • Old thread, I know, but just wanted to chime in and say that it had been happening to me recently (it had happened sometimes before, but not so often.) Unlike most of those that reported the problem, I have been using a local drive.

    The best solution that seems to be working for me right now is to simply turn off Auto-backup. If this is the culprit, wouldn't it be ironic that it would be the one causing me to lose a lot of work?

    I'll be writing my own service that backups the caproj, so I think that won't interrupt whatever C2 is doing.

  • To add to R0J0hound's suggestion, perhaps Pinning them with offset will be more straightforward to control?

  • You do not have permission to view this post

  • Oh man, that's a lot to process.

    I have a bunch of question but i will get them all together after re reading what you wrote, but the one that is bothering me right now is this:

    A global object exists through all the layouts, but it has to be created initially, what happens when you return to the layout of creation? does it duplicate? and if so how can you avoid duplication?

    Metathronos, yeah if you return to that layout and the event fires (due to the condition) it will duplicate. You have various ways of dealing with that, like checking against a particular object/instance and say if it exists or has a certain instance count, then don't create.

    Or you could use a different layout and event sheet to gather your assets, both Global and not, and never go back to that layout.

  • When you move out of the layout, you will lose everything except those that are Global objects. Usually Sprites are not Global by default; you need to turn them on. It depends on the nature of the pickups or how many Sprites you want to remain for you to manage.

    In regards to persistent pickups: I would like to suggest working with a 'database' of objects that you expect to be in a layout. This 'database' is actually a Dictionary, which are Global, so they persist. They are saved when you 'Save Game', so that's bonus.

    The Dictionary contains information about the item, for example. its default location, and its state/status (eg 'default', 'pickedup', etc) and whatever seems relevant to you. This Dictionary defines how the item will be displayed, if it were to be displayed at all.

    So for example, I have a Dictionary object called 'ItemsDict'. ItemsDict has an instance variable called `owner`. `owner` refers to the House that will refer to this dict. When I have ItemsDict.owner=House_A, this means that the items that will be contained in this dict are items from House_A.

    Then imagine we instantiate another ItemsDict and assign `owner` to House_B. So now we have 2 dicts.

    Now when we enter a layout, we pick the appropriate ItemsDict using the owner name. You may use the layout's name, or some other mechanism. Once you pick the correct ItemsDict, you cycle through all the keys, and instantiating new Sprites that correspond with the data inside ItemsDict.

    When the player has interacted (eg picked up) with an Item, you have make sure that ItemsDicts is updated first by removing the item/key or changing the values, or whatever is appropriate. Perhaps your update mechanism (ie the one that controls the visibility/presence of Sprites) should always derive its state from ItemsDict so that you only have to change ItemsDict and let your updating mechanism handle the visual updating of the scene.

    If you exit the layout the Sprites will be destroyed, but ItemsDict will remain. Then go into House_B layout, the same process applies; Sprites are recreated using ItemDict.owner=House_B. But when you go back to House_A layout, the Sprites are recreated, but the objects you've taken will no longer be in the dict and thus won't be created. And that's how you may approach persistence.

    Re portals: the player character, whether it is encapsulated as a single Sprite or multiple Sprites, I recommend to be Global because it's usually efficient as the player is the most consistent element from layout to layout.

    First, I suggest creating an instance variable in the player called something like `portal`. This makes you avoid the use of global variables.

    The concept is having an 'outbound' portal and an 'inbound' landing area. These are two different Sprites. The 'outbound' portal has 2 instance variables called `layout` and `landing`, which is the name of the layout and landing id, respectively, that this portal is going to deliver the player. The 'inbound' landing Sprite has only one instance variable called `name`, which is its identifier.

    For example, inside a House_A, there's a portal with `layout=FirstAvenueLayout` and `landing=House_A_entrance`. In the layout FirstAvenueLayout, there is an 'inbound' landing Sprite with the `name=House_A_entrance`.

    When the player goes over the 'outbound' portal (ie is overlapping object), the player acquires the `landing` variable value and puts that value into its own `portal` instance variable. This tells the player that whatever layout he ends up in, he will always be placed on the 'landing' Sprite with the same name. In this case it's 'House_A_entrance'.

    The System, on the other hand, will acquire the `layout` variable of the portal, which tells the System to move to that layout. When the layout is loaded (ie On Layout start), the player looks at its`portal` variable and finds the 'landing' Sprite and positions itself there.

    It is important here to make sure that when you 'land' at a place that it is not in the same place as an 'outbound' portal, or else you'll keep on bouncing back and forth. You may place other event conditions that prevent this, of course.

    Hope that made sense.

  • Tokenize your string by the newline character (in the image above I use \n); iterate through to tokenization to concat it back up with &newline at the end of each iteration.

  • but then there is a profile error dialog showing up when I try to run the exported game

    Delete your profile for the game:

    %localappdata%\<your_game_name>[/code:1das61kz]
  • TheRealDannyyy, many thanks for your info. Helpful as always.

  • I was wondering if any one is having a similar problem I'm having with NWJS v0.29.0 in which Effects are no longer working and using the fallback. NWJS v0.28.0 works fine though. Running C2 r250. (Could that be it?)

    EDIT: Just to add some images illustrating the problem.

    This is the base image.

    There's a green background (TiledBackground) that goes over this with an Effect: Multiply. In v0.28.0 Chromium 64, it works as expected, and this is how it looks:

    In v0.28.0 Chromium 65 it looks like this:

    Also other effects don't seem to work as well. They simply don't show up.

    I'm not knowledgeable enough to know if this is related to Chromium itself -- I tried looking for instances of rendering errors using WebGL effects, etc but couldn't find anything relevant -- so I'm not sure where the 'bug' lies. Any hints? Thanks!

    [EDIT]

    I've upgraded to C2 r255, but no, that doesn't seem to change anything.

  • Alon, sorry but I can't open up your C3 project (I'm not a subscriber and the free trial is a version lower than your c3p). I just use C2.

    I'll just quickly run through my setup, which is very basic.

    The first thing is that I use a circle sprite as a 'mover'.

    I squeeze this vertically so that it conforms to the 'perspective' of the rest of the artwork. As you can see above, the collision polygons simply follow the shape.

    The properties for the pathfinder is this:

    The Cell Size and Cell Border would highly depend on your own graphics and how 'tight' your moveable area is.

    Note that Obstacles is set to Solids.

    The next idea is that I use blocks and circles as collision and I layer them up. The best way to describe them is this picture:

    The some of the highlighted blue objects represent square sprites with collision polygons shaped likewise. If you can spot also there are these flattened pink circles (with a 'C' written on it) that are circle collisions. These Sprites have the Solids behaviour attached to them, and the Pathfinder uses these to navigate around. I use a combination of these collision Sprites to make up the moveable area. (In other progs like AGS, you define the walkable area, but in C2 I define the area that should be blocked).

    Here's another picture of the other scene in the demo. The pink circles are more visible here. I use a lot of them here.

    My event sheet for movement is super-simple. It looks like this:

    You can ignore most of it because it's mostly related to specifics of the game. As you can see it's nothing special. However, there is a 'special' workaround here that you will see in event line 35. Sometimes the player mover can get stuck because it gets too close and overlaps a collision. When it does this, Pathfinding usually fails to get a path. So what I do every time there is an attempt to walk, I check if the player mover if overlapping any of the collision Sprites (CollisionFamily). If it is overlapping, I disable Solids for the picked CollisionFamily Sprite and then regenerate the obstacle map. Then when the Pathfinding path is found, I enable the Solid again.

    Hopefully that helps. I can't share the project, unfortunately, and to be honest, it is burdened with many gameplay things anyway. The pathfinding is a very simple aspect of it.