Licence od 75 € Přihlásit se
DE EN FR ES IT CZ

UFO with shaderLamp [SOLVED]

Toto téma je několik let staré. Některé údaje se mohou týkat starší verze Visionaire Studia. Aktuální návody

  1. · 4 years ago
    Hello.

    I would like to make a moving object with a light source attached to it (like a UFO).

    There is a working script from SimonS for a flashlight (it's very cool):

    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)))

    but it works with the character.

    Is it possible to do a similar thing for the scene object? Maybe someone has already done something similar? My knowledge is not enough for this.

    Thank you.


  2. Pracujete na hře?

    Bezplatná verze umožňuje až 25 scén na projekt. Pro více scén a pro prodej hry potřebujete licenci.

    Zobrazit licence Vyzkoušet zdarma
  3. · 4 years ago
    Instead of modifying the script you could create the UFO as a character. Add in a way system for it in the scene wherever you need it, I'm going to assume up in the sky.

    Alternatively you could edit the script you pasted. You would need to replace all instances of game.CurrentCharacter.Position with Objects["example"].Offset or ActiveAnimations["example"].CurrentPosition, if you want to use an animation & move that instead of the scene object.
  4. · 4 years ago
    Thanks for the reply Afrlme.
    (Using a character was plan B smile).
    I will try to work on what you wrote.

Toto téma je uzavřené, protože tu přes rok nikdo neodpověděl. Svůj dotaz můžete položit v novém tématu.

Nové téma

Opravdu smazat tento příspěvek?