SHADERLAMP

  • #30, by SimonSTuesday, 29. December 2015, 19:15 9 years ago
    Could you show me the results of
    print(DataDumper(point(inverty(field("{x=500,y=500}")), 0)))
    

    ?

    Thread Captain

    1590 Posts


  • #31, by YarekTuesday, 29. December 2015, 19:30 9 years ago
    Hi SimonS

    Here you have the results of that:

    19:21:21: [string "testlight"]:3: invalid value (nil) at index 1 in table for 'concat'
    19:21:21: stack traceback:
    	[string "testlight"]:11: in function <[string "testlight"]:9>
    	[C]: in function 'DataDumper'
    	[string "testlight"]:3: in function <[string "testlight"]:1>
    	[C]: in function 'xpcall'
    	[string "testlight"]:1: in main chunk
    


    I just found a way to do what I wanted:

    local scrollpos
    scrollpos = game.ScrollPosition.x
    shaderLamp(0, 0, {375 - scrollpos ,720 - 50,10}, {375 - scrollpos ,720 - 564,10}, {0.05,0.0,0}, {0,0,0}, {1,1,1}, 1, 90, 0) 
    


    This is inside a function and allows me to scroll the screen and the shaders work in an absolute way so they don't move with the screen.

    I don't know why the bind doesn't work for me and if you want to check that I will test everything you ask me and I will try to help you but with this workaround I can fix my problem.

    I want to thank you guys again for this and if you need something and I can help with it don't hesitate to ask me.

    Newbie

    10 Posts

  • #32, by SimonSTuesday, 29. December 2015, 20:27 9 years ago
    Seems like there is something in the scope that overwrites the functions. But I think your solution works and so we don't need to solve the problems with bind.

    Thread Captain

    1590 Posts

  • #33, by YarekTuesday, 29. December 2015, 20:50 9 years ago
    I want to thank you again SimonS. I really appreciate it.

    Newbie

    10 Posts