Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

SHADERLAMP

  • #30, by SimonS 11 years ago Zitieren
    Could you show me the results of
    print(DataDumper(point(inverty(field("{x=500,y=500}")), 0)))
    

    ?
  • #31, by Yarek 11 years ago Zitieren
    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.
  • #32, by SimonS 11 years ago Zitieren
    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.
  • #33, by Yarek 11 years ago Zitieren
    I want to thank you again SimonS. I really appreciate it.