License from €75 Log in
DE EN FR ES IT CZ

Flashlight not working in VS 5RC

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 10 years ago
    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.
  2. · 10 years ago
    @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.
  3. · 10 years ago
    @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

  4. · 10 years ago
    @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!

  5. · 10 years ago
    Any news? grin
  6. · 10 years ago
  7. · 10 years ago
    @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.
  8. · 10 years ago
    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)))
  9. · 7 years ago
    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.


This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?