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

Flashlight not working in VS 5RC

  • #10, by afrlme 9 years ago Zitieren
    Try removing the quotation marks from around: "game.CurrentCharacter.Position" so it's just...
    game.CurrentCharacter.Position

    ... it's shorthand so it shouldn't be wrapped in speech marks or apostrophes.

    Also, I think shaderActivateLighting() should be set as 1 not 2 seeing as you only need 1 light, but I don't think it really makes much difference.
  • #11, by SimonS 9 years ago Zitieren
    @Lee: no that's just wrong. The quotations are there because it's calling this every frame.

    I found the error there is a space in line 225 that should be removed. There are also some other things to fix in the script. You can fix the space yourself for now. I will publish the updated script with the documentation.
  • #12, by afrlme 9 years ago Zitieren
    @Lee: no that's just wrong. The quotations are there because it's calling this every frame.

    I found the error there is a space in line 225 that should be removed. There are also some other things to fix in the script. You can fix the space yourself for now. I will publish the updated script with the documentation.
    If you say so mate. I'm not savvy with the shader stuff. wink

  • #13, by nikos papa 9 years ago Zitieren
    @Lee: no that's just wrong. The quotations are there because it's calling this every frame.

    I found the error there is a space in line 225 that should be removed. There are also some other things to fix in the script. You can fix the space yourself for now. I will publish the updated script with the documentation.
    Ok I'll wait for your update. Thank you. Let me know when is ready!

  • #14, by nikos papa 9 years ago Zitieren
    Any news? grin
  • #15, by SimonS 9 years ago Zitieren
  • #16, by dionous 9 years ago Zitieren
    @Simon Thanks for the updated script. Have done some tests, i can get the shaderLamps appear but it seems that the bind() is not working properly (not moving with char or mouse). How can we debug this? 

    Do you have any working example with the latest script on 5rc0 just to make sure we are on the same line? If you can confirm smth that works on your end it would be great.
  • #17, by SimonS 9 years ago Zitieren
    Try this:
    shaderActivateLighting(2) 
    
    shaderLamp(0, 0, {900,500,1}, {0,900,10}, {0.001,0.000001,0}, {0,0,0}, {1,1,1}, 1, 30, 0) 
    shaderLamp(1, 1, {1000,50,1}, {0,0,1}, {0.01,0.0,0.000001}, {2,2,2}, {2,2,2}, 1)
    
    bind("light1", "lights[0].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-80}))), 1)) 
    bind("light1", "lights[0].targetpos", point(inverty(cursor), 50))
    
    bind("light1", "lights[1].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{100,100}))), factor(dist(offset(field("game.CurrentCharacter.Position"),{0,-80}), cursor), 200)))
  • #18, by woogy 6 years ago Zitieren
    Hi @all:

    is there a possibility to use the current cursor position instead of "game.CurrentCharacter.Position"?

    I have tried the following:

    local curPos = getCursorPos()
    
    shaderActivateLighting(2) 
    shaderLamp(1, 1, {1000,500,2}, {0,0,1}, {0.01,0.0,0.000001}, {0,0,0}, {1,1.5,1}, 1,1,0)
    
    bind("light1", "lights[1].Position", point(inverty(scrollfix(offset(field("curPos"),{0,-200}))), 1)) 

    I must have forgotten or missed something.
    Can somebody help me?
    Thank you very much.