Menu
Login
Language
DE EN FR ES IT CZ

Search Result

  • RE: Flashlight around the character circle style

    Alright, so thank you for all the help, i just have 1 small last question and im sure than you can help me out! ^^So, i have the shaderlamp binded to my current character, is there anyway to bind the shaderlamp to a gameobject? So my goal is to make a "lantern' for my character. and that the shader follows the lantern, is there a way to do it ? thank you in advanceYou should be able to offset the position of the shaderlamp from the characters position, but I guess you would need a loop or something to detect when the character changes direction so that the offset can be adjusted.What is the {50, -50} bit in your script next to game.CurrentCharacter.Position for?

    by afrlme, 9 years ago

    12
    0
    afrlme 9 years ago
  • RE: Flashlight around the character circle style

    Alright, so thank you for all the help, i just have 1 small last question and im sure than you can help me out! ^^So, i have the shaderlamp binded to my current character, is there anyway to bind the shaderlamp to a gameobject? So my goal is to make a "lantern' for my character. and that the shader follows the lantern, is there a way to do it ? thank you in advance

    by nikos papa, 9 years ago

    12
    0
    nikos papa 9 years ago
  • RE: Flashlight around the character circle style

    What do you mean by "follows only right place"? As for the dot, I think that's probably something to do with the strength parameter inside of the script you've used. I'm pretty sure it can be adjusted to make it softer. Or maybe you could offset the z-index so it's drawn behind the character somehow - I don't remember what any of the parameters are for off the top of my head; it's been at least a year or more since I messed around with shader lights. Sorry.

    by afrlme, 9 years ago

    12
    0
    afrlme 9 years ago
  • RE: Flashlight around the character circle style

    This is the same thing.How we make shader follow char. I think I made it but there is any tutorial for shaderLamp?I think it's basically the same thing as the script you shared except instead of 2 different lights you will be using 1 light. Does that script you shared work ok? I'm pretty sure I recall Simon mentioning that shader binding method had changed at some point.If Simon doesn't see & reply to this post sometime over the next few days then I'll ask him on Skype - if I remember.

    by afrlme, 9 years ago

    12
    0
    afrlme 9 years ago
  • RE: Flashlight around the character circle style

    This is the same thing.How we make shader follow char. I think I made it but there is any tutorial for shaderLamp?

    by nikos papa, 9 years ago

    12
    0
    nikos papa 9 years ago
  • Flashlight around the character circle style

    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)))I saw this code which have both of them. How can I make it only show the curcle without hovering on character?Also if possible exlpain me how we make shader follow character.

    by nikos papa, 9 years ago

    12
    0
    nikos papa 9 years ago
  • RE: water reflections

    Check out this thread: http://www.visionaire-studio.net/forum/thread/shader-question-solved-/ don't ask me how to edit the openGL shader script though as I have no clue.If you are just wanting basic reflections & don't need to show character reflections then you could create them as regular animations. Technically you could create character animations too by creating an npc character & have it follow around & mirror your characters animations, but it would probably require a fair bit of work on your end to get it looking & working exactly as you want.

    by afrlme, 9 years ago

    2
    0
    afrlme 9 years ago
  • RE: lua - swapping assets for night mode

    I see @ARFLme! Is there some GLshader (I'm not even sure what shaders can do or cannot do) that can be applied on Scene objects (not the whole scene) and allow the particular scene object to be blended with the underlying layers in a manner other than opacity? eg. multiply blending, additive, substract,divide etc?Simon is the best one to ask about the shaders. He's the one that implemented it into the source code & wrote the shader toolkit script which is available on the script index page of the wiki.To my knowledge only some of the premade shader effects can be applied to scene objects though it's possible if you have enough savvy (I don't) to write your own shader functions & effects to apply to the scene / scene objects, etc.You could actually create an image the size of your scene which contains the background & all of the static objects that can't be manipulated/picked up. Other than that I don't know... I still think best approach would be 2 scenes. Getting the position of all your characters on current scene & teleporting them to same position on the new scene is pretty straightforward.

    by afrlme, 9 years ago

    13
    0
    afrlme 9 years ago
  • RE: lua - swapping assets for night mode

    Yeah, you could have tinted screen a color & set the strength with the openGL shader or apply lighting (spotlights) in any color you like, but neither of those options would add shadows or anything as it's still a 2D game. Useful if you want to darken a room & give your character a flashlight or the scene shifts between dark & light due to it being a dark room with some flashing/pulsing fluorescent lights or emergency lighting.

    by afrlme, 9 years ago

    13
    0
    afrlme 9 years ago
  • RE: lua - swapping assets for night mode

    Is it possible to work with color filters to darken a room?Maybe with the openGL shader to tint the screen a specific hue? Or you could use openGL lighting... Or overlay some semi-transparent dark images over the scene - also a possibility.

    by afrlme, 9 years ago

    13
    0
    afrlme 9 years ago