Posts by dustingunn

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.

    Here's an example of a shader that creates a shiney beam of light that scrolls over an object:

    It works, it's pretty cool. However, if the object rotates, the shine bands rotate with it. There's fPixelWidth and fPixelHeight to get screen dimensions, but is there a way to make a shader operate in world coordinates?

    When adding values to multiple objects at once, it will try to find the first empty value of the whole selection, so for example, if you selected 2 objects, the first object has an empty value at index 2 and the second object has an empty value at index 1, it will place the new value at index 2 for both objects

    This is what I mean. It didn't used to be like this and it adds a lot of extra work with no benefit. Previously it would just add the lowest value to the object with the least values so you could select groups of objects and quickly reach parity with all of them. I don't know what you mean by manipulating undetermined values. Bulk renaming undetermined values works 100% of the time for me. and I've been doing it A LOT.

    A feature new to 2.5+ which I greatly appreciated was being able to select many objects and easily make sure they had the same variable names. If they were different, it would be labeled "Undetermined." I could double-click and the selected object's naming would appear in the text box, click ok and now everything is synced. All done. This functionality is still technically there, it's just much harder to do now.

    Let's say I make a new object and add the "Group.NPC" qualifier. It starts with 0 initial values (previously they would start with 26. Not a big difference, just have to press the add button 26 more times.) Now, say I want to sync its variable names. I select all NPCs and press add. Instead of creating "(0) Alterable Value A" like it could have before this patch, it creates "(91) Alterable Value CN." The first empty slot every object has. This adds an extra requirement where I have to find every object with that qualifier and manually create potentially hundreds of values until every one has the exact same amount. The "select all objects with qualifier" isn't good for this since it only works with one object selected at a time, and that command always seems to select multiple phantom objects that don't even exist. So now, a new part of my process has to be grouping qualifier objects roughly in the same area of the frame editor so if I add a new value I can methodically add it to all the other ones and then I can sync the name.

    TL;DR: It would be nice if creating new alterable values for multiple objects worked how it did before.

    Included are 2 scripts that are ostensibly identical. Try running them with XLua. "LuaVS" (saved with Visual Studio) runs fine, and "LuaCF2" (saved using CF2.5's edit box "save to file" action) gives an error "unexpected symbol near ÿ". Even outside of Lua files, this is probably not ideal. I haven't downloaded a hex editor to figure out what's there, but a clean text file would be best.

    I found I can get another script running by loading it in the Lua file itself, using:

    Code
    function LoadFile(file)
        dofile(file);--Filename
        runscript();--This is the coroutine function
    end

    However, if I try to yield that script, it gives the error: "attempt to yield across metamethod/c-call boundary"

    I look that up and it's something about calling yield in a metamethod, but the definition of "metamethod" doesn't sound like something I'm using. I also wouldn't know how to release the script once I'm done with it.

    Edit: Putting the coroutine creation into the subscript itself (rather than the base) allows it to work, though a bit cumbersome. So the end of every script file would have:

    Code
    script = coroutine.create(runscript)

    I'm relatively new to using XLua. Using this tutorial:

    Please login to see this link.

    I got coroutines and yielding working. But notice that tutorial loads 2 lua files: "data.lua" and "a_script.lua." The thing is, the "a_script.lua" file never actually does anything, and I need some similar functionality where I can load in a "Base.lua" file with all my global members and functions, and then load smaller scripts for individual cutscenes, etc. I can't get the "runscript" function in a 2nd script to actually run.

    I've seen this done in other clickteam games, so surely there's a way?

    My thoughts were since loop conditions check a string, they'd be a significant cost. If the check happened as the top level of a parent event, it would only have to check the string once and be faster. Turns out it's roughly the same speed as flat/"normal" events. That means either 1. The loop name string is rechecked for every child event, or 2. I'm wrong about loops and their names are compiled so they're almost instant. I assumed they weren't compiled since they're calculations, but it would be useful to know if they are and I don't have to worry about them.


    Please login to see this attachment.

    I only know C# not C++, but do you know which of the extension file I would have to alter to fix it so spriter objects can display and update when out of frame? I want to give it a shot and see if I can get it to work and eliminate the pop-in.

    I've also found the collision box "bound to object" action doesn't work if the spriter object is flipped.

    I can get my shader working with its own layer via the standard: "Out.Color = tex2D(Texture0, coord);"

    I can get it to work for everything under that layer via: "Out.Color = tex2D(bkd, coord);"

    I can't think of any way to get it to work for everything. I could always make another layer above everything and sample the background from there, but I'm wondering if there's a method of doing this with HLSL?

    I have a shader activated when the menu is brought up. It requires multiple image files, so if I set effect to none and then set it back when the menu turns on, load the images from file and set all the variables, it could cause quite the freeze depending on the player's hard drive speed.

    So, is there a way to keep those images in memory?

    Or is there a way to just temporarily disable the shader at runtime?

    Or is there a fast way in HLSL to add a boolean toggle that stops it running without a huge performance hit? Like "If !_enabled break;" or something?

    I've got this object loading a list with the deliminator of newline$, no escape character and inserted before 0.

    It saves the list to file correctly, but at runtime it says there's only 1 total item and it's "ÿþa"

    What am I doing wrong?