Flashlight again [SOLVED]

  • #1, by red363Wednesday, 17. November, 23:56 2 weeks ago
    Hi!
    I try the script with a flashlight, and it doesn't work either. As others wrote, the spotlight is fixed in the center of the screen and shines in one direction, does not react to anything.

    https://www.visionaire-studio.net/forum/thread/flashlight-28...

    shaderActivateLighting(2)

    shaderLamp(0, 0, {900,500,1}, {0,900,10}, {0.001,0.000001,0}, {0,0,0}, {1,1,1}, 1, 90, 0)
    shaderLamp(1, 1, {1000,50,1}, {0,0,1}, {0.01,0.0,0.00001}, {0,0,0}, {1,1,1}, 1)

    bind("light1", "lights[0].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200}))), 1))
    bind("light1", "lights[0].targetpos", point(inverty(cursor), 10))
    bind("light1", "lights[1].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200}))), factor(dist(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200})), cursor), 10)))

    Can you tell me what the problem is?
    My version Visionaire 5.1.6

    Thanks.


    Newbie

    19 Posts


  • #2, by SimonSThursday, 18. November, 23:17 2 weeks ago
    Hi, please ensure you got the latest shader script from here:

    Also the point is renamed to shaderPoint because of name collisions, so it's:

    shaderActivateLighting(2)
    shaderLamp(0, 0, {900,500,1}, {0,900,10}, {0.001,0.000001,0}, {0,0,0}, {1,1,1}, 1, 90, 0)
    shaderLamp(1, 1, {1000,50,1}, {0,0,1}, {0.01,0.0,0.00001}, {0,0,0}, {1,1,1}, 1)

    bind("light1", "lights[0].position", shaderPoint(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200}))), 1))
    bind("light1", "lights[0].targetpos", shaderPoint(inverty(cursor), 10))
    bind("light1", "lights[1].position", shaderPoint(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200}))), factor(dist(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200})), cursor), 10)))
    1
    2
    3
    4
    5
    6
    7
    8

    Thread Captain

    1477 Posts

  • #3, by red363Thursday, 18. November, 23:46 2 weeks ago
    Wow! I didn't even hope. Thanks a lot!

    Newbie

    19 Posts

Write post