• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Sending cinematic transmissions with sounds Help me!

Status
Not open for further replies.
Level 4
Joined
Sep 30, 2007
Messages
43
Hi,now here is the case.I'm tryn' to make a region where when i enter with a sertain unit,a couple of other hostyle units appear and one of them sends a cinematic transmission with a sound.now problem is i cant make the sound work.


BanditsAmbuish
Events
Unit - A unit enters Trap Bandits <gen>
Conditions
Or - Any (Conditions) are true
Conditions
(Triggering unit) Equal to Troll
(Triggering unit) Equal to HumanWarr
Actions
Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 1 <gen>) facing Default building facing degrees
Set BandiAttacker = (Last created unit)
Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 2 <gen>) facing Default building facing degrees
Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 3 <gen>) facing Default building facing degrees
Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 4 <gen>) facing Default building facing degrees
Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 5 <gen>) facing Default building facing degrees
Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 6 <gen>) facing Default building facing degrees
Sound - Play BanditYesAttack2 <gen>
Set Bandit = (Last played sound)
Cinematic - Send transmission to (All players) from BandiAttacker named Bandit: Play Bandit and display Say your prayers!. Modify duration: Add 0.00 seconds and Wait
Trigger - Turn off (This trigger)

Can some one tell me what i'm doin' wrong here.
Thank you!
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Hi,now here is the case.I'm tryn' to make a region where when i enter with a sertain unit,a couple of other hostyle units appear and one of them sends a cinematic transmission with a sound.now problem is i cant make the sound work.


  • BanditsAmbuish
    • Events
      • Unit - A unit enters Trap Bandits <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Troll
          • (Triggering unit) Equal to HumanWarr
    • Actions
      • Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 1 <gen>) facing Default building facing degrees
      • Set BandiAttacker = (Last created unit)
      • Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 2 <gen>) facing Default building facing degrees
      • Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 3 <gen>) facing Default building facing degrees
      • Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 4 <gen>) facing Default building facing degrees
      • Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 5 <gen>) facing Default building facing degrees
      • Unit - Create 1 Bandit for Player 12 (Brown) at (Center of Bandit 6 <gen>) facing Default building facing degrees
      • Sound - Play BanditYesAttack2 <gen>
      • Set Bandit = (Last played sound)
      • Cinematic - Send transmission to (All players) from BandiAttacker named Bandit: Play Bandit and display Say your prayers!. Modify duration: Add 0.00 seconds and Wait
      • Trigger - Turn off (This trigger)
Can some one tell me what i'm doin' wrong here.
Thank you!

B.t.w. you might want to concider posting this in trigger tags.
Also, there are a lot of leaks in your trigger, I suggest doing something like:

  • init visib
    • Events
      • Unit - A unit enters Trap Bandits <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Troll
          • (Triggering unit) Equal to HumanWarr
    • Actions
      • Set temp_loc[1] = (Center of Bandit 1 <gen>)
      • Set temp_loc[2] = (Center of Bandit 2 <gen>)
      • Set temp_loc[3] = (Center of Bandit 3 <gen>)
      • Set temp_loc[4] = (Center of Bandit 4 <gen>)
      • Set temp_loc[5] = (Center of Bandit 5 <gen>)
      • Set temp_loc[6] = (Center of Bandit 6 <gen>)
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Bandit for Player 12 (Brown) at temp_loc[(Integer A)] facing Default building facing degrees
          • Set bandit[(Integer A)] = (Last created unit)
          • Custom script: call RemoveLocation(udg_temp_loc[GetForLoopIndexA])
      • Sound - Play BanditYesAttack2 <gen>
      • Set sound = (Last played sound)
      • Cinematic - Send transmission to (All players) from BandiAttacker named Bandit: Play sound and display Say your prayers!. Modify duration: Add 0.00 seconds and Wait
      • Trigger - Turn off (This trigger)
If you however are going to use the locations all game long then you won't have to destroy them because they are not considered to be a leak.

It's not a leak if a location stays in memmory untill the game ends if that is the purpose of the location.

You might also want to destroy the trigger if it's not going to be turned on again later in-game.

Does the sound b.t.w. play from your imports?
Are you sure there's nothing wrong with the sound that your playing?
Have you tryed testing the sound in a different trigger?
For example after ... seconds of game time?

EDIT: Have you also tryed removing the Cinematic Send transmission? Since your playing the sound twice at the same time, which might cause the sound to stop playing.
Either remove that or the Sound - Play BanditYesAttack2
 
Level 4
Joined
Sep 30, 2007
Messages
43
B.t.w. you might want to concider posting this in trigger tags.
Also, there are a lot of leaks in your trigger, I suggest doing something like:

  • init visib
    • Events
      • Unit - A unit enters Trap Bandits <gen>
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Troll
          • (Triggering unit) Equal to HumanWarr
    • Actions
      • Set temp_loc[1] = (Center of Bandit 1 <gen>)
      • Set temp_loc[2] = (Center of Bandit 2 <gen>)
      • Set temp_loc[3] = (Center of Bandit 3 <gen>)
      • Set temp_loc[4] = (Center of Bandit 4 <gen>)
      • Set temp_loc[5] = (Center of Bandit 5 <gen>)
      • Set temp_loc[6] = (Center of Bandit 6 <gen>)
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Bandit for Player 12 (Brown) at temp_loc[(Integer A)] facing Default building facing degrees
          • Set bandit[(Integer A)] = (Last created unit)
          • Custom script: call RemoveLocation(udg_temp_loc[GetForLoopIndexA])
      • Sound - Play BanditYesAttack2 <gen>
      • Set sound = (Last played sound)
      • Cinematic - Send transmission to (All players) from BandiAttacker named Bandit: Play Bandit and display Say your prayers!. Modify duration: Add 0.00 seconds and Wait
      • Trigger - Turn off (This trigger)
If you however are going to use the locations all game long then you won't have to destroy them because they are not considered to be a leak.

It's not a leak if a location stays in memmory untill the game ends if that is the purpose of the location.

You might also want to destroy the trigger if it's not going to be turned on again later in-game.

Does the sound b.t.w. play from your imports?
Are you sure there's nothing wrong with the sound that your playing?
Have you tryed testing the sound in a different trigger?
For example after ... seconds of game time?

Not rly,but its not an imported sound from elsewhere its from WC3 so i tought there is nothing wrong with it,any way thank you for the fast respond i didnt expect it to be so fast rly xD i will try it out now and thats for the advise bout the leaks.
 
Level 4
Joined
Sep 30, 2007
Messages
43
EDIT: Line 139:Invalid argument type (rect)
set bj_forLoopAIndex = bj_forLoopAIndex + 1
I suppouse this is what you need
PS sorr for making you wait had some iterner problems.
EDIT2:Ill just copy pastethe whole thing than

EDIT 3:Line 139:Invalid argument type (rect)



//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************

globals
// User-defined
hashtable udg_HashTable = null
group udg_UnitGroup = null
location array udg_Points
unit udg_Unit = null
real array udg_Real
location array udg_ABI_Point_Position
string array udg_String
attacktype array udg_Attack_Type
damagetype array udg_Damage_Type
real array udg_Real_ABI_Damage
group array udg_ABI_Unit_Group
integer array udg_Integer
unit udg_WaterTotem = null
unit udg_WindTotem = null
unit udg_FireTotem = null
unit udg_BigSpider = null
unit udg_Troll = null
sound udg_Bandit = null
unit array udg_BandiAttacker
unit udg_HumanWarr = null
weathereffect udg_RainLoarderon = null
rect array udg_temp_loc

// Generated
rect gg_rct_Trap_Bandits = null
rect gg_rct_Select_Troll_SHaman = null
rect gg_rct_Select_Elf_Archer = null
rect gg_rct_Select_Sorceress = null
rect gg_rct_Select_Warrior = null
rect gg_rct_Start = null
rect gg_rct_Bandit_1 = null
rect gg_rct_Bandit_2 = null
rect gg_rct_Bandit_3 = null
rect gg_rct_Bandit_4 = null
rect gg_rct_Bandit_5 = null
rect gg_rct_Bandit_6 = null
rect gg_rct_Grom_Moves = null
sound gg_snd_BanditYesAttack2 = null
sound gg_snd_O05Mannoroth39 = null
sound gg_snd_O05Grom40 = null
sound gg_snd_O05Grom42 = null
sound gg_snd_O05Mannoroth43 = null
trigger gg_trg_Weather_Rain = null
trigger gg_trg_Selection_System_Troll_Shaman = null
trigger gg_trg_Selection_System_Human_Warrior = null
trigger gg_trg_Charge_HashTable = null
trigger gg_trg_Charge_start = null
trigger gg_trg_Charge_loop = null
trigger gg_trg_Defend_1 = null
trigger gg_trg_Elementals_Call = null
trigger gg_trg_Bandits_Ambuish = null
unit gg_unit_e001_0032 = null
unit gg_unit_e001_0031 = null
unit gg_unit_H000_0022 = null
unit gg_unit_O000_0024 = null
unit gg_unit_e001_0029 = null
unit gg_unit_e001_0030 = null
endglobals

function InitGlobals takes nothing returns nothing
local integer i = 0
set udg_UnitGroup = CreateGroup()
set i = 0
loop
exitwhen (i > 1)
set udg_Real = 0
set i = i + 1
endloop

set i = 0
loop
exitwhen (i > 1)
set udg_String = ""
set i = i + 1
endloop

set i = 0
loop
exitwhen (i > 1)
set udg_Real_ABI_Damage = 0
set i = i + 1
endloop

set i = 0
loop
exitwhen (i > 1)
set udg_ABI_Unit_Group = CreateGroup()
set i = i + 1
endloop

set i = 0
loop
exitwhen (i > 1)
set udg_Integer = 0
set i = i + 1
endloop

endfunction

function Trig_Bandits_Ambuish_Func012C takes nothing returns boolean
if ( ( GetTriggerUnit() == udg_Troll ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_HumanWarr ) ) then
return true
endif
return false
endfunction

function Trig_Bandits_Ambuish_Conditions takes nothing returns boolean
if ( not Trig_Bandits_Ambuish_Func012C() ) then
return false
endif
return true
endfunction

function Trig_Bandits_Ambuish_Actions takes nothing returns nothing
set udg_temp_loc[1] = gg_rct_Bandit_1
set udg_temp_loc[2] = gg_rct_Bandit_2
set udg_temp_loc[3] = gg_rct_Bandit_3
set udg_temp_loc[4] = gg_rct_Bandit_4
set udg_temp_loc[5] = gg_rct_Bandit_5
set udg_temp_loc[6] = gg_rct_Bandit_6
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'nban', Player(11), GetRectCenter(udg_temp_loc[GetForLoopIndexA()]), bj_UNIT_FACING )
set udg_BandiAttacker[GetForLoopIndexA()] = GetLastCreatedUnit()
call RemoveLocation(udg_temp_loc[GetForLoopIndexA()])
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call PlaySoundBJ( gg_snd_BanditYesAttack2 )
set udg_Bandit = GetLastPlayedSound()
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), udg_BandiAttacker[1], "TRIGSTR_183", udg_Bandit, "TRIGSTR_184", bj_TIMETYPE_ADD, 0, true )
call DisableTrigger( GetTriggeringTrigger() )
endfunction

//===========================================================================
function InitTrig_Bandits_Ambuish takes nothing returns nothing
set gg_trg_Bandits_Ambuish = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Bandits_Ambuish, gg_rct_Trap_Bandits )
call TriggerAddCondition( gg_trg_Bandits_Ambuish, Condition( function Trig_Bandits_Ambuish_Conditions ) )
call TriggerAddAction( gg_trg_Bandits_Ambuish, function Trig_Bandits_Ambuish_Actions )
endfunction

EDIT 4:if there is any chance of you giving me some link or explaining yourself how do you find where the error is.Because this is not the first place i meet one of em errors

Edit 5:Says this set bj_forLoopAIndex = bj_forLoopAIndex + 1 is line 139

EDIT 6 Maybe i did something wrong here ?

Bandits Ambuish
Events
Unit - A unit enters Trap Bandits <gen>
Conditions
Or - Any (Conditions) are true
Conditions
(Triggering unit) Equal to Troll
(Triggering unit) Equal to HumanWarr
Actions
Set temp_loc[1] = Bandit 1 <gen>
Set temp_loc[2] = Bandit 2 <gen>
Set temp_loc[3] = Bandit 3 <gen>
Set temp_loc[4] = Bandit 4 <gen>
Set temp_loc[5] = Bandit 5 <gen>
Set temp_loc[6] = Bandit 6 <gen>
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Unit - Create 1 Bandit for Player 12 (Brown) at (Center of temp_loc[(Integer A)]) facing Default building facing degrees
Set BandiAttacker[(Integer A)] = (Last created unit)
Custom script: call RemoveLocation(udg_temp_loc[GetForLoopIndexA()])
Sound - Play BanditYesAttack2 <gen>
Set Bandit = (Last played sound)
Cinematic - Send transmission to (All players) from BandiAttacker[1] named Bandit: Play Bandit and display Say your prayers!. Modify duration: Add 0.00 seconds and Wait
Trigger - Turn off (This trigger)

EDIT 7:its actualy a Region variable and i belive they should be

EDIT 8:LOL i didnt know it has to be point i fixed it thank you and rly sorry for the spend time

EDIT 9:Nah i made it a point variable and it worked,but still cant get a sound out.

EDIT 10:No,but i will try now

EDIT 11:Didnt work.

EDIT 12:I used to make it back at the days but i dont remember how. xD

EDIT 13:I feel so rude taking so mutch of your time ;[

EDIT 14:Finaly xD Thanks alot again!When i get more things done on this map ill inform you so that you can check it out if you want that is xD

EDIT 15:Hehehe ofc ;]
 
Last edited:
Level 14
Joined
Apr 20, 2009
Messages
1,543
Sorry for the late respond, was kind of ocupied. B.t.w. please edit your posts instead of double-tripple posting.

EDIT: could you perhaps post the errors you are recieving? Maybe a screenshot or just copy n paste?

Yeah sorry, my bad:

call RemoveLocation(udg_temp_loc[GetForLoopIndexA()])

EDIT 2: could you tell me which line that is? It should show you where the error is. I can't tell without knowing where your code is and on which line. I can guess, but that won't bring us any further...
EDIT 3: ow and b.t.w. you can post new questions under my post as long as your not double-tripple posting :)

EDIT4: not really, Invalid argument type (rect) means that a region is passed to a function which doesn't take any regions. In this case forLoopAIndex is just the loop that is being increased every time it passes by the loop.
This has nothing to do with a rect (region)

you should see numbers next to the lines of code, could you check what line 139 is?

EDIT 5: I really can't seem to understand why this is a invalid argument (rect) it's impossible 0.0! A loop index does not have anything to do with regions >.<!
Are you sure it is the correct Line number 0.o??
It should be underneath all the code in a little box, the place where your cursor is is the place where the line number is.

Ow and b.t.w. are you sure that temp_loc is a point variable? And that all the indexes of the array are filled with correct regions?
EDIT 6: nevermind I see that it is :S
Could you perhaps display forLoopAIndex in a message in-game? I want to see if all the numbers are correct...

EDIT 7: Removing edit number seven due to inaccurate information explained in crazzzytoo edit number 8 ^.^

EDIT 8: Have you tryed removing Cinematic - Send transmission? Or try removing the Sound - Play BanditYesAttack2 <gen> and Set Bandit = (Last played sound) and then change the Send transmission to Play BanditYesAttack2. Either one of the two, not both at the same time ^.^

EDIT 9: I'll just take a look myself, just a sec have to start up world editor ^.-

EDIT 10: open up your sound editor right click the sound your using -> Edit Sound Variable -> uncheck 3D sound. This should fix it for you ;)
(checking 3D sound means the sound will not be played above a certain range. Which means that the further you are away from the sound being played at a specific point, the less clearly you can hear the sound)
So for example if you shoot a bullet from a gun then the sound comes from the gun but if your standing miles away from the gun you can barely hear it.

EDIT 11: doesn't matter, time spend helping something out is time spent well. More positive karma ftw :p

EDIT 12: I hope in the future that we can post reply's underneath each other instead of always editing our posts, just make sure not to double post and only edit when no one has replyed yet :)


EDIT 14:Finaly xD Thanks alot again!When i get more things done on this map ill inform you so that you can check it out if you want that is xD

I would love to :)

I guess this problem is [Solved]?
Any mod in here that can help us out ^.^??
 
Last edited:
Instead of this
  • Cinematic - Send transmission to (All players) from BandiAttacker[1] named Bandit: Play Bandit and display Say your prayers!. Modify duration: Add 0.00 seconds and Wait
try
  • Cinematic - Send transmission to (All players) from BandiAttacker[1] named Bandit: Play Bandit and display Say your prayers!. Modify duration: Set to 2.00 seconds and Wait
If sound don't play, then go to sound editor and setup variables there.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Instead of this
  • Cinematic - Send transmission to (All players) from BandiAttacker[1] named Bandit: Play Bandit and display Say your prayers!. Modify duration: Add 0.00 seconds and Wait
try
  • Cinematic - Send transmission to (All players) from BandiAttacker[1] named Bandit: Play Bandit and display Say your prayers!. Modify duration: Set to 2.00 seconds and Wait
If sound don't play, then go to sound editor and setup variables there.

Already suggested changing the variable in my previous post, his problem was already solved ;)

Check EDIT 10 in my post...
 
Last edited:
Status
Not open for further replies.
Top