Hello,
has anyone created somekind of drug (screen) effect? Is that possible to do?
e.g. after drinking some wine bottle or eating a special mushroom, the vision became trouble or colored, or the screen fade in/out rapidetely during a certain time.
drug effect?
Re: drug effect?
What a fun idea. Should be easy enough, something like:
1) Activate a timer that calls the FadeOut script
2) Activate a timer that calls the FadeIn script (executed after the above FadeOut call)
Rinse and repeat for a specific duration (eg, spell or potion duration)
1) Activate a timer that calls the FadeOut script
2) Activate a timer that calls the FadeIn script (executed after the above FadeOut call)
Rinse and repeat for a specific duration (eg, spell or potion duration)
Re: drug effect?
Xanathar did one in ORRR2. You saw the effect if your PC ate one of his special mushrooms.
https://youtu.be/mu33I-CHwP4?t=33m
https://youtu.be/mu33I-CHwP4?t=33m
Re: drug effect?
aow! that's pretty nice! 
Re: drug effect?
I looked about the source in the ORR2 but I decided to make something easy for me, that may not be so nice, but here is a "psychedelic" potion:
SpoilerShow
Code: Select all
defineObject{
name = "strange_flask",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/flask.fbx",
},
{
class = "Item",
uiName = "Strange Flask",
gfxIndex = 144,
weight = 0.3,
traits = { "potion" },
},
{
class = "UsableItem",
--emptyItem = "flask",
sound = "consume_potion",
onUseItem = function(self, champion)
party.party:playScreenEffect("RGBscreen")
end,
},
},
}SpoilerShow
Code: Select all
defineParticleSystem{
name = "RGBscreen",
emitters = {
-- flames
{
-- spawnBurst = true,
emissionRate = 1000,
emissionTime = 20,
maxParticles = 4000,
sprayAngle = {0,360},
velocity = {0,0.3},
boxMin = {-1.1,-0.9,1},
boxMax = {1.1,0.9,1},
objectSpace = true,
texture = "assets/textures/particles/flame.tga",
frameRate = 35,
frameSize = 32,
frameCount = 50,
lifetime = {0.3, 0.5},
color0 = {2, 0, 0},
opacity = 0.5,
fadeIn = 0.001,
fadeOut = 0.15,
size = {0.4005, 0.425},
gravity = {0,0,0},
airResistance = 0.5,
rotationSpeed = 2,
blendMode = "Additive",
},
{
-- spawnBurst = true,
emissionRate = 500,
emissionTime = 20,
maxParticles = 4000,
sprayAngle = {0,180},
velocity = {0,0.3},
boxMin = {-1.1,-0.9,1},
boxMax = {1.1,0.9,1},
objectSpace = true,
texture = "assets/textures/particles/slime.tga",
frameRate = 35,
frameSize = 32,
frameCount = 50,
lifetime = {0.3, 0.5},
color0 = {0, 2, 0},
opacity = 1,
fadeIn = 0.001,
fadeOut = 0.15,
size = {0.4005, 0.425},
gravity = {0,0,0},
airResistance = 0.5,
rotationSpeed = 2,
blendMode = "Additive",
},
{
-- spawnBurst = true,
emissionRate = 1500,
emissionTime = 20,
maxParticles = 4000,
sprayAngle = {45,90},
velocity = {0,0.3},
boxMin = {-1.1,-0.9,1},
boxMax = {1.1,0.9,1},
objectSpace = true,
texture = "assets/textures/particles/glow.tga",
frameRate = 35,
frameSize = 32,
frameCount = 50,
lifetime = {0.3, 0.5},
color0 = {0, 0, 2},
opacity = 1,
fadeIn = 0.001,
fadeOut = 0.15,
size = {0.4005, 0.425},
gravity = {0,0,0},
airResistance = 0.5,
rotationSpeed = 2,
blendMode = "Additive",
},
-- glow
{
-- spawnBurst = true,
emissionRate = 1,
emissionTime = 20,
maxParticles = 10,
boxMin = {0,0,1},
boxMax = {0,0,1},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/glow.tga",
lifetime = {0.5, 1},
colorAnimation = false,
color0 = {0, 0, 2},
opacity = 0.8,
fadeIn = 0.001,
fadeOut = 0.1,
size = {4.5, 4.1},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 2,
blendMode = "Additive",
objectSpace = true,
}
}
}