root/GHI/DynamicActions/GHI_ActionEffects.lua

605612
75
	},
75
	},
76
76
77
77
78
});
79
80
81
table.insert(GHI_ProvidedDynamicActions,{
82
	name = "Play Sound",
83
	guid = "sound_01",
84
	authorName = "The Gryphonheart Team",
85
	authorGuid = "00x1",
86
	version = 1,
87
	category = category,
88
	description = "This action plays a specified sound.",
89
	icon = "Interface\\Icons\\inv_misc_drum_06",
90
	gotOnSetupPort = false,
91
	setupOnlyOnce = false,
92
	script =
93
	[[
94
95
96
	    local targetSound = dyn.GetInput("sound")
97
98
99
          if targetSound ~= nil then
100
           --GHI_PlaySound(targetSound)
101
           dyn.TriggerOutPort("playsound")
102
103
         else
104
           dyn.TriggerOutPort("nosound")
105
         end
106
	]],
107
	ports = {
108
		playsound = {
109
			name = "Play Sound",
110
			order = 1,
111
			direction = "out",
112
			description = "play the sound",
113
		},
114
		nosound = {
115
			name = "no sound",
116
			direction = "out",
117
			order = 2,
118
			description = "",
119
		},
120
	},
121
	inputs = {
122
		sound = {
123
			name = "Sound",
124
			description = "The sound to play",
125
			type = "string",
126
			defaultValue = "",
127
		},
128
129
	},
130
	outputs = {
131
		placeholder = {
132
			name = "",
133
			description = "unsure what to put here",
134
			type = boolean,
135
		},
136
	},
137
138
139
});
140
141
142
table.insert(GHI_ProvidedDynamicActions,{
143
	name = "Play Sound",
144
	guid = "sound_02",
145
	authorName = "The Gryphonheart Team",
146
	authorGuid = "00x1",
147
	version = 1,
148
	category = category,
149
	description = "This action plays a specified sound.",
150
	icon = "Interface\\Icons\\inv_misc_drum_06",
151
	gotOnSetupPort = false,
152
	setupOnlyOnce = false,
153
	script =
154
	[[
155
156
157
	    local targetSound = dyn.GetInput("sound")
158
         local range = dyn.GetInput("range")
159
160
        if range > 0 then
161
162
        else
163
           --GHI_PlaySound(targetSound)
164
165
        end
166
	]],
167
	ports = {
168
		playsound = {
169
			name = "Play Sound",
170
			order = 1,
171
			direction = "out",
172
			description = "play the sound",
173
		},
174
		nosound = {
175
			name = "no sound",
176
			direction = "out",
177
			order = 2,
178
			description = "",
179
		},
180
	},
181
	inputs = {
182
		sound = {
183
			name = "Sound",
184
			description = "The sound to play",
185
			type = "string",
186
			defaultValue = "",
187
		},
188
          range ={
189
               name = "Range" ,
190
               description = "The range of the sound(optional)",
191
               type = "Number",
192
               defaultValue = 0,
193
194
          }
195
	},
196
	outputs = {
197
		placeholder = {
198
			name = "",
199
			description = "unsure what to put here",
200
			type = boolean,
201
		},
202
	},
203
204
78
});
205
});