Might I request some assistance with a UI design.

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.
  • I'm trying to create a UI that can be dynamically shown, the goal is to use it to load many different groups.

    I know this looks bad, but I'm overall proud of how it works, I hope its not too garbage of code, but thats the main thing I would appreciate, is there an easier way to do this, and the issue that is mainly currently stopping me is the "Friends.Group". the icons appear as i want but they change order, and i cannot work out a way to get them in controlled order. I'm not feeling my best so if you can help but something is too much to understand i will answer, please understand... I'm a terrible coder, i have little to no capacity for math, i tend to pick thing up as i see them work though them, Im guessing a lot. thank you for your time

    DC

  • I'd recommend you stop using the command 'every split second'. You're going to slow down your game with just your UI. Perhaps let players click on something to expand the menu, don't automatically do so after a split second. I'd also recommend you lose your mouse trails.

    Typically Fusion will run through all the commands 60 times a second (frame rate). But if something is happening quicker than that, Fusion must stop and attend to that command - which means it's not getting to the rest of the commands in time. This creates a noticeable lag and may even freeze the game on slower computers.

    As for getting icons to appear in order, you can give them each an alterable value and use that, for example:

    Code
    * Start of Frame
        Group.Children : Spread value 0 in Alterable Value A
        Special : Set Control Value to 0 (global value)
    
    On each one...
    
    * Alterable Value A of Group.Children = Control Value
        Group.Friends : Set X position to X Right( "Group.Children" ) + 20 (or whatever you need to do)
        Special : Add 1 to Control Value

    You can also check if you do need the loops you're running. For example you're running this:

    Code
    * On each one of Group.Friends, loop name "PosX"
        Group.Friends : Set X position to X( "Group.Friends" ) + 40
    
    * Group.Friends is in the play area 
    + Group.Friends is overlapping Group.Friends
    + Pick one of Group.Friends
        Start loop for each one of Group.Friends, loop name "PosX"

    It will probably work the same if you just do this:

    Code
    * Group.Friends is in the play area 
    + Group.Friends is overlapping Group.Friends
    + Pick one of Group.Friends
    
        Group.Friends : Set X position to X( "Group.Friends" ) + 40

    Casual games: Please login to see this link.

  • I really do appreciate your time, I'm still working on it, I'm going slow and have not had a chance to do much, but I think I see what to do.

    I do intend to try to stream line this, but this is not intended for an action game, these events will pause during sequences that would not need them in real time.

    again thank you

  • Im still struggling, i now have a clear question how and why are events 47 and 48 behaving differently, one is on keypress the other is on foreach loop, both should add to the value of the global value called iconPosX, and they do. But on keypress the icons show up and move themselves down (not correctly sorted) but they appear, on the loop... nothing from the initial state occurs. it feel slike the one event is moving too fast for the iconst to appear but i dont know how to get this to play nice, i feel like im really close, but have for days now. I really do appreciate any help, greatly. thank you

    • The event on line 45 will only include the two objects that are overlapping each other. It will ignore the other objects.
    • Line 12 will stall Fusion because you're doing things in split seconds. You could change that to once every second, or once every 60th of the second and release Fusion to get to the rest of the code.
    • Line 13 might run continuously or not at all - that command - only one action when event loops typically waits for something else to happen. You could improve it by saying if time to exit = 0, set time to exist to -10, which will automatically force it to run once.
    • Line 17 is again going to stall Fusion because it won't have time to do anything else. It could also run multiple times, because as long as the mouse pointer is over the icon, the event will continue to fire. Every time it will reset the time to exist to 30. So it won't start the count down until the player moves the mouse pointer away.
    • Lines 13 and 32 duplicate each other.
    • Line 33 + 34 you don't need to include pick one - and it might be messing with your code. The foreach loop goes through each object and tests the condition. It's by definition picking one.
    • Lines 25, 31 + 37 all give actions for Fusion to run when the hud becomes visible and 31 and 37 both run loops. Fusion can't do them simultaneously, it will execute them in sequence and you might not always get the same results. I'd recommend you combine them so there's only one action and loop.

    ---

    You could probably simplify the entire process by placing the objects on screen where they should be and simply making them visible / invisible based on where the mouse is, instead of trying to run multiple loops to correctly position the objects.

    Casual games: Please login to see this link.

  • Thank you for the help. I'm working on a concept where the end goal is to have a variety of "verbs" displayed as icons. Each verb will either be part of the starter set or appear as gaps that need to be discovered or become available only at specific times.

    I want the user to be able to scroll through the usable current icons if they have more than the screen can display. Not all verbs will be relevant in every frame, so irrelevant ones won't be included. The menu will run "always," but only when it is active. All other events in the frame will pause since this is not a high-movement game. It might evolve into one eventually, but for now, I'm focusing on getting a proof of concept.

    I'm not a coder, but I have a good idea of what I want to achieve. I believe it's doable and expandable once I get the basic concept working. I hope eventually to get significant help to minimize coding on my part in the future, but for now, I just need a functional model—not perfect, just working.

    Thank you for your assistance.

  • oooh, yes. i think this is much closer to what im trying to do, i will see if it work in my game today but i nost appreciate the sample and your time, thank you so much
    DC

    Hmmmm... I think this will work, i am looking at it and trying to understand, and learn. so in the interest of learning if I can ask some questions. all the top level objects have a "myValue" but i dont see them referenced in the events. how and why does the system know what order to use... or is the engine doing something unseen?

  • I typed the values in manually. You can also spread a value - same effect. Only spreading a value will spread it in the creation order, which might not be the order in which I numbered them.

    I use the value in the events to isolate which child objects to display - see line 10 - the third "Special" command below. I pick up that value and allocate it to a global value. The reason I allocate it to a global value is so I can reference it afterwards - it's a way of saving the value. In line 12 I use this global value.


    Code
    * User clicks with left button on Group.Good
    + Group.Good is visible
    	Group.Neutral : Make invisible
    	Special : Set Countdown to 5
    	Special : Set Calculate XValue  to X( "Group.Good" )
    	Special : Set Top Level Number to My Number( "Group.Good" )
    	Start loop for each one of Group.Neutral, loop name "Place Icons Level2 "

    Also I forgot to add in a command - to only subtract 1 from the countdown if it is larger than 0. This stops unnecessary code running in the background. (Line 16)

    Code
    * Countdown > 0
    + Every 01''-00
    	Special : Subtract 1 from  Countdown

    The system will typically reference and use objects in the sequence in which they're created. But you can also manually allocate a value to the objects and use that to sort them.

    Casual games: Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!