Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Help needed: Create a random 'flashing' effect to simulate lights that are on the fritz...

Status
Not open for further replies.

TheMysticWyvern

Towns Guard
Xy$
0.00
I'm trying to create an effect to simulate lights flickering on and off inside a darkened room. I was only able to make it so the flashing either never stopped, or never happened. But, I'd like something like... one flash here, and then a couple of seconds later, two quicker flashes in a row, etc. Could anyone help me with this problem? Thank you!
 

Rise Evil

Praised Adventurer
Xy$
0.00
Try to manipulate the Teint commands by modifying its saturations etc. And then, put those commands in a Common Event that can be triggered by a switch and then make variable map conditions where it will work.
 

LTN Games

Master Mind
Resource Team
Xy$
0.01
I don't know if you can do it random but this is what you would be looking for in the event structure. The tint screen just makes the room darker, the flash screen literally creates a flash and the wait command waits 20 frames before proceeding to the next flash. Be sure to set to set the event trigger to paralell .flashscreen.png
 

Rise Evil

Praised Adventurer
Xy$
0.00
Actually you can put it at random. All you have to do is make conditionnal branch with random variables. Say after every a certain amount of frame wait, there's one chance on 2 or 3 that the flash appears. And put it into loop if you want the process repeat. It should work I believe.
 

Xyphien

Owner
Staff member
Administrator
Resource Team
Xy$
9.57
@TheMysticWyvern if your question has been solved please mark that post as Best Answer to show everyone that you question has been answered. This is to help anyone that may have the same question in the future know that there is an answer to their question.
 

eivl

Local Hero
Xy$
0.00
So you can do this by setting up two things.

Number of blinks variable. Lets call it "1-3" and it is a control variable randomly from 1-3
then set up a number of fixed wait times variable. Lets call it "4 times" and it is a control variable randomly from 1-4

Make a conditional Branch that checks variable 1-3

If: [varable with number of blinks] = 1
Code:
Flash screen 1 time

[Choose between 4 different Wait times]
:Else
If: [varable with number of blinks] = 2
Code:
Flash screen 2 time

[Choose between 4 different Wait times]
......... until you reach the number of blinks you want..


The code for Wait times is a conditional branch with IF-Else statement that checks your variable 1-4 (with four different times, those beeing 120,240,480,960 Frames)

then you should be done with a Sudo-Random flashing screen.

Set the event to run in Parallel and you are set.






or if you want the JSON data for the map instead.

Code:
{
"autoplayBgm":false,"autoplayBgs":false,"battleback1Name":"","battleback2Name":"","bgm":{"name":"","pan":0,"pitch":100,"volume":90},"bgs":{"name":"","pan":0,"pitch":100,"volume":90},"disableDashing":false,"displayName":"","encounterList":[],"encounterStep":30,"height":13,"note":"","parallaxLoopX":false,"parallaxLoopY":false,"parallaxName":"","parallaxShow":true,"parallaxSx":0,"parallaxSy":0,"scrollType":0,"specifyBattleback":false,"tilesetId":3,"width":17,
"data":[1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5923,5921,5921,5921,5925,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5920,6275,6274,6278,5920,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5920,6281,6280,6284,5920,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5920,1552,1552,1552,5920,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5920,1552,1552,1552,5920,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5920,1552,1552,1552,5920,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5920,1552,1552,1552,5920,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5920,1552,1552,1552,5920,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,5929,5921,5921,5921,5927,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,1536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
"events":[
null,
{"id":1,"name":"Blinking SudoRandomly","note":"","pages":[{"conditions":{"actorId":1,"actorValid":false,"itemId":1,"itemValid":false,"selfSwitchCh":"A","selfSwitchValid":false,"switch1Id":1,"switch1Valid":false,"switch2Id":1,"switch2Valid":false,"variableId":1,"variableValid":false,"variableValue":0},"directionFix":false,"image":{"characterIndex":0,"characterName":"","direction":2,"pattern":0,"tileId":0},"list":[{"code":122,"indent":0,"parameters":[4,4,0,2,1,4]},{"code":122,"indent":0,"parameters":[2,2,0,2,1,3]},{"code":111,"indent":0,"parameters":[1,2,0,1,0]},{"code":224,"indent":1,"parameters":[[255,255,255,170],60,true]},{"code":230,"indent":1,"parameters":[20]},{"code":111,"indent":1,"parameters":[1,4,0,1,0]},{"code":230,"indent":2,"parameters":[120]},{"code":0,"indent":2,"parameters":[]},{"code":411,"indent":1,"parameters":[]},{"code":111,"indent":2,"parameters":[1,4,0,2,0]},{"code":230,"indent":3,"parameters":[240]},{"code":0,"indent":3,"parameters":[]},{"code":411,"indent":2,"parameters":[]},{"code":111,"indent":3,"parameters":[1,4,0,3,0]},{"code":230,"indent":4,"parameters":[480]},{"code":0,"indent":4,"parameters":[]},{"code":411,"indent":3,"parameters":[]},{"code":111,"indent":4,"parameters":[1,4,0,4,0]},{"code":230,"indent":5,"parameters":[960]},{"code":0,"indent":5,"parameters":[]},{"code":412,"indent":4,"parameters":[]},{"code":0,"indent":4,"parameters":[]},{"code":412,"indent":3,"parameters":[]},{"code":0,"indent":3,"parameters":[]},{"code":412,"indent":2,"parameters":[]},{"code":0,"indent":2,"parameters":[]},{"code":412,"indent":1,"parameters":[]},{"code":0,"indent":1,"parameters":[]},{"code":411,"indent":0,"parameters":[]},{"code":111,"indent":1,"parameters":[1,2,0,2,0]},{"code":224,"indent":2,"parameters":[[255,255,255,170],60,true]},{"code":230,"indent":2,"parameters":[20]},{"code":224,"indent":2,"parameters":[[255,255,255,170],60,true]},{"code":230,"indent":2,"parameters":[20]},{"code":111,"indent":2,"parameters":[1,4,0,1,0]},{"code":230,"indent":3,"parameters":[120]},{"code":0,"indent":3,"parameters":[]},{"code":411,"indent":2,"parameters":[]},{"code":111,"indent":3,"parameters":[1,4,0,2,0]},{"code":230,"indent":4,"parameters":[240]},{"code":0,"indent":4,"parameters":[]},{"code":411,"indent":3,"parameters":[]},{"code":111,"indent":4,"parameters":[1,4,0,3,0]},{"code":230,"indent":5,"parameters":[480]},{"code":0,"indent":5,"parameters":[]},{"code":411,"indent":4,"parameters":[]},{"code":111,"indent":5,"parameters":[1,4,0,4,0]},{"code":230,"indent":6,"parameters":[960]},{"code":0,"indent":6,"parameters":[]},{"code":412,"indent":5,"parameters":[]},{"code":0,"indent":5,"parameters":[]},{"code":412,"indent":4,"parameters":[]},{"code":0,"indent":4,"parameters":[]},{"code":412,"indent":3,"parameters":[]},{"code":0,"indent":3,"parameters":[]},{"code":412,"indent":2,"parameters":[]},{"code":0,"indent":2,"parameters":[]},{"code":411,"indent":1,"parameters":[]},{"code":111,"indent":2,"parameters":[1,2,0,3,0]},{"code":224,"indent":3,"parameters":[[255,255,255,170],60,true]},{"code":230,"indent":3,"parameters":[20]},{"code":224,"indent":3,"parameters":[[255,255,255,170],60,true]},{"code":230,"indent":3,"parameters":[20]},{"code":224,"indent":3,"parameters":[[255,255,255,170],60,true]},{"code":230,"indent":3,"parameters":[20]},{"code":111,"indent":3,"parameters":[1,4,0,1,0]},{"code":230,"indent":4,"parameters":[120]},{"code":0,"indent":4,"parameters":[]},{"code":411,"indent":3,"parameters":[]},{"code":111,"indent":4,"parameters":[1,4,0,2,0]},{"code":230,"indent":5,"parameters":[240]},{"code":0,"indent":5,"parameters":[]},{"code":411,"indent":4,"parameters":[]},{"code":111,"indent":5,"parameters":[1,4,0,3,0]},{"code":230,"indent":6,"parameters":[480]},{"code":0,"indent":6,"parameters":[]},{"code":411,"indent":5,"parameters":[]},{"code":111,"indent":6,"parameters":[1,4,0,4,0]},{"code":230,"indent":7,"parameters":[960]},{"code":0,"indent":7,"parameters":[]},{"code":412,"indent":6,"parameters":[]},{"code":0,"indent":6,"parameters":[]},{"code":412,"indent":5,"parameters":[]},{"code":0,"indent":5,"parameters":[]},{"code":412,"indent":4,"parameters":[]},{"code":0,"indent":4,"parameters":[]},{"code":412,"indent":3,"parameters":[]},{"code":0,"indent":3,"parameters":[]},{"code":412,"indent":2,"parameters":[]},{"code":0,"indent":2,"parameters":[]},{"code":412,"indent":1,"parameters":[]},{"code":0,"indent":1,"parameters":[]},{"code":412,"indent":0,"parameters":[]},{"code":0,"indent":0,"parameters":[]}],"moveFrequency":3,"moveRoute":{"list":[{"code":0,"parameters":[]}],"repeat":true,"skippable":false,"wait":false},"moveSpeed":3,"moveType":0,"priorityType":0,"stepAnime":false,"through":false,"trigger":4,"walkAnime":true}],"x":0,"y":0}
]
}
 
Status
Not open for further replies.
Top