Posts by bhlaab

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 mean, MIDI is ancient in the world of computers, but it still generates a tiny, tiny file. That's got something going for it. Not all MIDI is bad.

    I wouldn't recommend it. I tried to use midis in a game recently and I found that there was no way, even on an OS level, to control the volume of MIDI playback once you get to Windows 7 and up. I mean, there are probably ways but certainly not ones you can access in CTF. I ended up having to convert all of the midis to wav files.

    [MENTION=18866]schrodinger[/MENTION] great example! But the "orbit from center" approach isn't what bhlaab was looking for.

    I managed to shave the edges off the square and it should be working exactly as you want it right now. I added the crosshair moving along with the player: it just follows the same logic as the crosshair being moved by the mouse (add player delta to crosshair position).

    Please login to see this attachment.

    EDIT x2: Take care with the order of your events. The events from this example (minus the "start of frame" one) should go below your player movement code if you are using a custom engine, otherwise the system will break.

    This is perfect! Thank you so much!

    Do you have anything in the click store or a ~$5 game i can buy to support you back?

    I haven't really read this forum so sorry if this has already been covered or if I'm way off the mark but this is a pretty crude version of what I think you are after. I was expecting to have to do some work to stop the cursor getting stuck to the side of the circle but actually it's not too bad as it is. It is a little bit sticky though so if you want me to smooth it out I can give it a go.

    This is good, thank you. I would like the stickiness fixed if you don't mind. But more importantly, is there a way to attach this crosshair to a moving object? It looks like it's soft coded to (320,240) and breaks if I try to change those values by attaching them to a moving object.

    I feel like I'm putting people through a lot here, so if someone fixes this up for me all nice I'll... I don't know, find some way to get $5 to you or something :)

    Here's the concept, but with a square boundary instead of a circle. It's late, so remembering the math required to make the boundary a circle is giving me a headache right now even though i'm sure it's simple X)

    I'm sure one of the other participants in the thread could modify it easily, if they so chose.

    Please login to see this attachment.

    Yes! If I can get that in a circle it'd be perfect! Thank you.

    Another feature I'd like, and I know I'm pushing it here, but if the crosshair could track alongside the player. So if you're aiming to the left and move the player up, the crosshair goes up as well, and same for every other direction.

    What? That makes no sense. Why would there ever be a delay? Do YOU even know what you're trying to accomplish?

    As it stands the example I gave you accomplishes exactly what you asked about - at least the way you described it.

    You don't need to be rude, especially since I've explained this multiple times in detail. Perhaps this would be best described with an illustration

    Please login to see this picture.

    I'm not on my pc so I only have the free edition of fusion. Does the mouse object not work?

    Why do you need this to be so specific? There is literally zero reason to map the windows mouse cursor.

    1. I want the crosshair to be limited as a matter of the game's difficulty and design. I want the player to have to aim their shots rather than just point and click on their targets.
    2. I need the controls to be responsive. If at any point there's a delay between the player moving the mouse and the crosshair moving the direction they've pointed the mouse, that is unresponsive and affects the basic playability of my game. If I can't get this working right, there's no point to anything else IMO.

    clamped means you limit the value like a combined max and min, so that you take the max between 0 and the relative position, as well as the min between 150 and the relative position.

    The actual mouse cursor will be hidden. The crosshairs will be positioned at the hero's position plus the mouse's distance from the mouse starting position (sometimes called the mouse delta), but limited to that circle.

    if the distance from the character to that offset that positions the crosshairs is going to be greater than 150, you can limit it using trig functions to keep it within that circle. there's a few ways to do this but one i was thinking of involves finding the angle between the crosshairs and the hero (like with the arctan2 function or whatever CTF uses). you can use that found angle, putting it into the cosine and sine functions to constrain it to that circle.


    Sent from my iPhone using Tapatalk

    so whats the event look like?

    always -> set Xcrosshair to Xcharacter + range(xmouse,0,150*cos(Xcharacter) ??

    Please login to see this attachment.
    Try this, I just tethered the active onto a actionspot, then used another active as the crosshair, did a distance check with the crosshair and then position accordingly to the distance restriction. The distance check forms a perfect circle, then you just place a graphic to show where the radius is. You must be rotating the player active in order for it to work.

    Yeah, this is basically the starting point of what I'm trying to do. But go into your code and put an "always hide mouse cursor" event and play around with it and maybe you'll see what I mean about it feeling bad because of the delay when the actual mouse cursor is outside the boundary but the crosshair remains. THAT's the big obstacle I'm trying to get past.

    Quote


    SolarB
    From an old example I dug up. You can change the distances etc in the crosshair values. I hope this is what you're after?

    Thank you for trying to help, but this is sort of the opposite of what I'm after. I don't mind if the crosshair overlaps the player, it's the outside boundary that's the problem.

    Quote

    Could you add another condition, you can use the overlapping one and a NOT Overlapping one.
    The first is like exposed before and the second you can just adjust the direction of the crosshair over the border of the "good area", supposing it is a circle is just a little trigonometry calculations.
    Is this a possible solution?

    I'm not sure what you're saying here.

    See, that wouldn't work because once the mouse cursor leaves that perimeter but the crosshair stays, there's a mismatch. Let's say you're aiming all the way at 90 degrees. You want to quickly turn around to 270 degrees to shoot a bad guy behind you. There would be a delay in all crosshair movement until the mouse cursor returns to the perimeter zone.

    I was avoiding posting an mfa because I had just been experimenting, so this example is really buggy and the code in there is very sloppy but if it helps illustrate what I'm trying to do better. (I hope sendspace is ok)
    Please login to see this link.

    It sort of shows what I'm trying to do, but it doesn't work properly.

    Well it doesnt make a difference to me how its achieved. Right now I have a crosshair set to xmouse and ymouse, but how do I make it so that the crosshair never leaves that area?

    I need more than a visual effect where only the crosshair stops at the edge of the circle but the (invisible) mouse keeps going, though. The problem is that once the mouse and the crosshair aren't aligned it feels awful to play.

    I am making a game where you move in eight directions and aim and shoot with the mouse.

    What I would like to do is constrain the cursor to a circular, ~150px radius around the player. It is important that the mouse itself be constrained, not just the visual of the crosshair. The mouse cursor and crosshair should be 1:1.
    Within the 150px radius the mouse should act normally. Which is to say, I'm not looking for the cursor to move around the edges of the circle, but to be contained within. The cursor being on the edge of the circle should not inhibit rotating around the player, however.

    I would also like the mouse cursor to inherit the directional speed of the player so that I can use an advanced camera system without the aim becoming misaligned (since the mouse cursor does not scroll at the same speed as the screen).


    I hope this isn't as complicated as I've convinced myself it is :)