tomhaiger's Forum Posts

  • dop2000

    Wow, i feel stupid lol. I've been racking my brain trying to workout how to fix this and it turns out to be so simple. Thanks again.

    I only added the big OK button for that capx as a way to navigate between layouts, i don't actually use that in my project.

    With Webstorage, you can still access it by right clicking on insert new object and check show deprciated objects. The reason i'm still using it is because i've used it in past projects to save settings etc and works fine, so i thought i'd just stick with it.

    Thank you again, i can't tell you how grateful i am for your help on this. Hopefully i won't need any more help :)

  • dop2000

    Really sorry for bothering you again (hopefully it's the last time!) but i have ran into an issue i was hoping you can help with.

    So i have a slide out menu that initially appears off screen but slides in to screen when triggered by pressing a button. I have my slider pinned to that menu so it slides out as well when it's triggered.

    With the examples you've previously provided, i've got the slider set up and working with the touch controls, however i've got an issue with the gamepad controls.

    When i use then gamepad controls the move the cursor, the slider value changes each time when closing & opening the menu. This doesn't happen with the touch controls and the events for touch & gamepad are similar for the most part.

    I have had to make a few adjustments from the example you last gave, i've added pin and unpinning the slider actions due to the sliding out menu - which you can see in the capx.

    I was hoping you could help fix this issue, I'm sure its the way i've set it up but i can't figure out how to fix it.

    https://www.dropbox.com/s/z56ncsfs7jm63im/SliderGamepad%20%28pop-up%29.capx?dl=0

    Again, i do apologise for constantly asking for your help, i really do hope this is the last time.

    Thanks

    Also, i have Litetween plugin used in the capx.

  • dop2000

    Cheers dude. Honestly lost count of the amount of times i've thanked you lol.

    Really appreciate your help on this, thank you.

  • I have a custom slider (credit dop2000) that i can use the touch control with to move and wanted to have the option of using a gamepad to control it. I have a custom cursor that i'm able to control using the analog sticks and want to use that to drag the slider.

    I've more or less got the basics of this working, where i'm able to drag the slider using the gamepad by having the slider pin to the cursor when the cursor is overlapping the slider and the A button is held down.

    However the issue i have is that while doing this, i can drag the slider anywhere. I want to be able to drag it just left or right along the slider bar.

    I'm aware of why its happening, as i have my cursor set so that it can anywhere, so when the slider is pinned to cursor, it goes wherever the cursor goes. However, i can't seem to figure out how to just make it move just left or right along the slider bar.

    So i need help with two things:

    1. Get the slider to just move left or right along the slider bar axis when using the gamepad.

    2. Have the cursor in the centre of the slider when dragging it. Right now, when dragging the slider, it moves to the side of the slider (makes more sense if you try the capx). This is a minor issue, it just something i would like to sort out but its not a priority.

    Would appriciate some help and apologies if it seemed like i was going on and on in this post, i just wanted to try and explain the problem as best i could.

    CAPX - https://www.dropbox.com/s/sc10hieacrf2ux1/Slider%20%28Controller%29.capx?dl=0

    Thanks

  • dop2000

    Thank you, I've got it working now thanks to your help.

  • dop2000

    Unfortunately i forgot to save the project when replacing the instance variable with global, but i can confirm that it still didn't work.

    I've checked with the original project using instance variable and the global variables aren't being reset from what i can see. When checking in debug mode, i can see that the instance variables are being reset when changing layout as the sliders are destroyed, which is why the colour stays as it should as that value is a global variable while the sliders value is an instance variable.

    I suspect its either this or how i've set up the slider X value that is causing the issue. However i'm not sure how to save the slider value.

    I've provided my project file in the first post, heres the link -

    dropbox.com/s/0gjkzpdzeuler6y/Slider.capx

  • dop2000

    Thanks, I have tried that. I tried replacing the instance variables to global variables and load at the start of layout but still get the same issue.

  • I have a custom slider which allows you to change the colour of sprites so that you can customise objects.

    It works well, when i change the colour of a box and go to the next layout, the colour is what i changed it to.

    The issue i have is trying to save the slider settings/values when switching layouts. When i go back to the previous layout to where the sliders are, they revert back to their original position and the boxes on that layout also go back to their original colours. However, if i switch to the other layout again, the boxes colour is what they should be when i changed it.

    So i need to find a way to save the slider settings/values when switching layouts, as everything else seems fine.

    I would appreciate some help on this.

    dropbox.com/s/0gjkzpdzeuler6y/Slider.capx

  • dop2000

    Perfect, just what i was looking for :)

    Thanks for your help, appriciate it.

  • dop2000

    Thanks for the link, it's pretty good but it's nearly what i'm looking for.

    The precision movement itself works well and is what i wanted but i don't want the aim movement in the capx you provided, where it resets to the middle and basically moves around an axis.

    I want to use the aim movement from my capx with the precision movement from your capx.

    Basically, i want to move the aim like a mouse, only using the joystick to control it. The slower i move the joystick, the slower the aim moves. (This is a WAY better explanation of what i'm after, rather than how i described in the first post :) )

  • I have a aiming cursor that can be controlled with a joystick.

    I wanted to apply precision movement to the joystick controls, where the cursor movement speed is dependant on how much you move the joystick in a direction.

    Think of the camera control in games like Call of Duty where you can move the camera/aim with the right stick, if you move the joystick in a direction lightly, the camera moves slowly and moves quicker the further you move the joystick. (hope i've explained it clearly)

    Here's my capx -

    dropbox.com/s/ca8qlf85vmo4awm/Gamepad%20Cursor.capx

    I've tried to do this but haven't had any luck, so i'd appreciate some help.

  • You do not have permission to view this post

  • dop2000

    Great! Thank you for your help, i've worked on this for ages trying to get it to work :)

  • I've got an issue with my infinite scrolling background. When it's scrolling in full screen with Outer Scale, every few seconds the background on both sides disappears for like half a second and appears again (it's difficult to describe, you'll understand when you actually see it).

    If you don't view it in full screen, it works fine. I think it has something to do with it scrolling outside the layout as i'm using Outer Scale, but can't work out how to fix it.

    Here's my capx - https://www.dropbox.com/s/3ud897ocq1v25ac/Tiled%20BG%20%28Scrolling%29.capx?dl=0

    I've tried other methods of scrolling and get the same issue, so i don't know how to fix this. Would appriciate help on this.

  • I've got it working now. I was using Create Object, which was causing my issue.

    Thanks for your help.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads