Page 1 of 4

Functional Tornado Siren [WIP]

Posted: 02 Sep 2018, 23:03
by Mg3094066
It's currently possible make a building react to a disaster? (A specific disaster)
IDK play a sound?
This could be useful in case of make a Disaster response Unit

Re: Disaster reaction?

Posted: 03 Sep 2018, 00:18
by Bearbear76
I think that's possible
https://theotown.com/forum/viewtopic.php?f=81&t=5959
Use variables but it's non specific if I'm correct

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 03:56
by Mg3094066
Ok.. Lets see if really is possible. ©

Code: Select all

[{"draw ground":true,"frames":[{"bmp":"TornadoSiren2.png"}],"height":1,"id":"$TornadoSiren00","influence magnament":100,"type":"public","width":1}]
Here is the basic structure of the Json file
TornadoSiren.png
TornadoSiren.png (569 Bytes) Viewed 3763 times
TornadoSiren2.png
TornadoSiren2.png (774 Bytes) Viewed 3763 times
The Main objective it's program the reaction feature and add a sound... I already have it.

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 04:07
by CommanderABab
Be sure to spell management right if you really want to influence it.

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 04:07
by Oshawotta737
Yes. I live in tornado alley so i hear these frequently. I am so happuy these are being made. We shpould make it so you can trigger them by hitting one and trigger them all for fun instead of just for tornadoes. And when that happens all cars except police fire and ambulance should temporaaraly despawn.

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 04:32
by Mg3094066
ok ok ok...
I'll need some help...
I have to add a disaster condition frame 1 and then
Action: play sound:<sound>?

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 06:50
by JustAnyone
disaster=1. Yes.
However it will shout at you if any disaster happens.

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 07:54
by Mg3094066
JustAnyone wrote:
03 Sep 2018, 06:50
disaster=1. Yes.
However it will shout at you if any disaster happens.
Dats the purpose of the plug-in XD

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 19:40
by Mg3094066
The disaster Condition isn't available at the moment...
I'll try to write the entire Json code for avoid dealing with problems at the update time and release it as fast as possible

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 20:12
by ElephantEthan
Mg3094066 wrote:
03 Sep 2018, 19:40
The disaster Condition isn't available at the moment...
I'll try to write the entire Json code for avoid dealing with problems at the update time and release it as fast as possible
There's a disaster variable, doesn't it work?

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 20:16
by Mg3094066
But only will play the sound with a disaster Condition... The action will be play sound

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 20:51
by ElephantEthan
Then make the condition check for the disaster variable.

Code: Select all

"condition":{  // This condition is only true if there's a disaster going on in the city.
  "type":"value",
  "code":"disaster",
  "z":1
}
@Mg3094066

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 21:16
by Mg3094066
Hmmmm.. I have to put the Fun condition in the same object?
:0'''

Re: Functional Tornado Siren [WIP]

Posted: 03 Sep 2018, 21:43
by Mg3094066
Hmmmm...

Code: Select all

[{
	"draw ground": true,
	"frames": [{
		"bmp": "TornadoSiren2.png"
	}],
	"height": 1,
	"id": "$TornadoSiren00",
	"influence maganament": 100,
	"type": "public",
	"width": 1,
	"fun": [{
		"condition": [{
			"type": "value",
			"code": "disaster",
			"z": 1
		}],
		"actions": [{
			"type": "play",
			"Id": "."
		}]
	}],
	{
		"id": "$Thunderbolt_1003",
		"type": "sound",
		"file": "Thunderbolt1003.mp3"
		"volume": 5 "
	}
}]

Re: Functional Tornado Siren [WIP]

Posted: 04 Sep 2018, 00:05
by Oshawotta737
Iwhen will this be ready?

Re: Functional Tornado Siren [WIP]

Posted: 04 Sep 2018, 03:04
by Mg3094066
Really... Idk...
There may be spelling mistakes in the code (commas and brackets)
and the update it's still missing

Re: Functional Tornado Siren [WIP]

Posted: 04 Sep 2018, 03:15
by Oshawotta737
Oh.

Re: Functional Tornado Siren [WIP]

Posted: 04 Sep 2018, 03:33
by Mg3094066
Welp... The question will be...
My code is fine? ↑

Re: Functional Tornado Siren [WIP]

Posted: 04 Sep 2018, 04:27
by CommanderABab
Mg3094066 wrote:
04 Sep 2018, 03:33
Welp... The question will be...
My code is fine? ↑
Probably not.
Screenshot_20180903-220230.jpg

Re: Functional Tornado Siren [WIP]

Posted: 04 Sep 2018, 04:29
by CommanderABab
Remember management is spelled m a n a g e m e n t.