Von Perkele's Forum Posts

  • alright

    I want the boss to stop doing any functions when it is hit by a rocket

    ...

    How do i share my game file lmao

    Easiest way is probably getting a drop box account, save your project to your computer, transfer to drop box, enable sharing of that file in drop box, create a download link with drop box and post the link here.

  • Hi,

    I've had some trouble with trigger once conditions. Let's say you have a main condition like Boolean = True, and a subconditions under it, some of what are supposed to trigger once while true and others that have other conditions. Do trigger once conditions work reliably in such subconditions or are you supposed to always use them in the main condition?

    I have tested this in different situations and seem to get conflicting results, sometimes it seems the subcondition is run only once and other times not..or maybe I'm just setting the conditions wrong somehow.

  • Does anyone know what it the best practice regarding this issue?

  • This is from the manual:

    Layout-by-layout loading

    Construct only loads the images for the current layout. This avoids loading the entire project in memory which would be slow and consume a great deal of memory. When starting a layout, all images for the objects placed in the Layout View are pre-loaded. This includes all frames in all animations of any Sprite objects. (In other words, Sprites are either fully loaded in to memory, or not at all - they are never part-loaded.) When the layout ends, all images that are loaded but not used on the next layout are released from memory.

    I understand this meaning only objects that are placed in the layout editor view are pre-loaded.

  • A few things:

    Do the objects need to be global for this to work if you place them in another layout?

    Do you mean that if an object is referred to in an event it is loaded to memory in the start of the layout even if there is no instance of the object placed in the layout editor?

  • If you place every object type you need in the layout in the layout editor it is supposed to make the layout load faster.

    Also you can store info in the initial objects' variables and effect parameters that the later created objects can use automatically. That is very useful.

    I have set up a condition using the "create object by name" condition that every time when a normalmapped object is spawned from a normalmapped family creates the right normalmap for that object from the normalmaps family. I'm using one instance of all the normalmaps as a storage instance since the effect has tons of conditions and they differ for different objects.

    However, I'm finding it a bit tricky to deal with the fact that I want to destroy the storage objects at the layout start so they won't get on the way. If I simply destroy them all at the start then the other normalmaps that automatically get created at the layout start (using the automated method I described previously) for my normalmapped objects get destroyed as well.

    The best way I currently have to deal with it is having the initial storage items in a "destroy at start" family and placed in their own layer, and the storage objects of that family in that specific layer get destroyed at the start. It seems a bit crude.

    Are there better methods for dealing with initial data storage objects? I know using data arrays is one solution, but I think it's actually more cumbersome overall than my current method.

  • You do not have permission to view this post

  • The problem is that button. When you click it it gets selected (or "focused") and other parts of you browser get "unfocused". This is the fix:

    dropbox.com/s/bw80wcq2kywl4tg/ISOMovementFix.c3p

    It's probably better to make your own buttons from sprites, it's much more flexible. These browser components are a pain to deal with if you want any kind of extended customization.

    Also one thing, I simplified you ISO variable and made it a boolean. Also made the event run only once. If you leave your events like that they will run every tick, which will cause much unneeded processing. If your event only needs to run once when specific conditions are met make sure that they don't actually run every tick. It's the same thing as with the problem you posted last time.

  • Actually I came up with a better idea...

    Since all my normalmaps are named after their parent sprite with "_Normalmap" extension in their name, I can put all the normalmapped objects into a family and then create the object by its name by using "normalmapped&"_Normalmap"" as the name. No need for string variables.

  • Yes, I think I might find it useful to also create them automatically when I create the sprites later.

    One option of course is to have one object of every type placed in the editor (as you should do anyway since it helps construct load the objects you need in the startup) and have the string data saved in that object, so all the objects that get created after that will use that object's variable data as default. After that you can put those objects in a family "DestroyAtStart" and destroy them in layout start, and it apparently won't affect the objects' default variable data when created later on.

  • But if you have to put the variable in the sprite variable as it's created isn't that the same amount of work as creating the normalmap individually when the sprite is created? You have to give each object its individual normalmap variable after all..

  • Thanks, yes that's pretty good. Works when I give the normalmap name to a string variable in an already existing object.

    But what if you create both objects one after the other? The original sprite would be spawned with no instance variable string data that it can use to spawn the normal map.

  • Try Construct 3

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

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

    Suppose I have two families, one for normal sprites and one for normalmaps for the sprites. I'm trying to run a condition that runs for each of the sprite family object and creates a normalmap from the normal map family for each of them. However, the normal map is randomly chosen from the normalmap family. Is it possible to create a condition that picks the right normal map for the right sprite using families in the condition? Or do I have make a condition for every individual sprite to create the normal map for it?

  • Yes I guess that is the best way to go. I suppose I will have to move the text boxes away from the screen.

  • Hi,

    I think you misunderstood me. I don't want to disable the text input. All the methods above (as well as turning the text box invisible, btw) unable the player to type values in the text box. I don't want to do that.

    What I want to do is disable cursor selection of the text box text, or alternatively make the cursor highlighting effect invisible. You see, you can turn the text box text invisible, but after that you can still highlight it with the cursor, which then makes that text visible again.

    See how the text box numbers become visible when I highlighted them with the cursor? I just want to disable that feature. I also don't really want to make the whole text box invisible or move it away since I like those arrows that you can click to increase or decrease the value by one.