• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] CinematicFadeBJ ?

Status
Not open for further replies.

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
Hi,

i don't really know what to do with these?
[Jass=]
// ===== Lightning =====
if ( GetRandomInt(1, 4) == 1 ) then
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 0.10, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 90.00, 0 )
call TriggerSleepAction( 0.10 )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 0.10, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 90.00, 0 )
set udg_TempGroup = GetUnitsInRectAll(udg_Area[GetRandomInt(1, 9)])
call IssueTargetOrder( gg_unit_h02R_0618, "thunderbolt", GroupPickRandomUnit(udg_TempGroup) )
call DestroyGroup(udg_TempGroup)
endif
[/code]

i check jngp: CinematicFadeBJ
it shows this:
[Jass=]
function CinematicFadeBJ takes integer fadetype, real duration, string tex, real red, real green, real blue, real trans returns nothing
if (fadetype == bj_CINEFADETYPE_FADEOUT) then
// Fade out to the requested color.
call AbortCinematicFadeBJ()
call CinematicFadeCommonBJ(red, green, blue, duration, tex, 100, trans)
elseif (fadetype == bj_CINEFADETYPE_FADEIN) then
// Fade in from the requested color.
call AbortCinematicFadeBJ()
call CinematicFadeCommonBJ(red, green, blue, duration, tex, trans, 100)
call FinishCinematicFadeAfterBJ(duration)
elseif (fadetype == bj_CINEFADETYPE_FADEOUTIN) then
// Fade out to the requested color, and then fade back in from it.
if (duration > 0) then
call AbortCinematicFadeBJ()
call CinematicFadeCommonBJ(red, green, blue, duration * 0.5, tex, 100, trans)
call ContinueCinematicFadeAfterBJ(duration * 0.5, red, green, blue, trans, tex)
call FinishCinematicFadeAfterBJ(duration)
endif
else
// Unrecognized fadetype - ignore the request.
endif
endfunction
[/code]

i have detected that i use actually this one

[Jass=]
elseif (fadetype == bj_CINEFADETYPE_FADEOUTIN) then
// Fade out to the requested color, and then fade back in from it.
if (duration > 0) then
call AbortCinematicFadeBJ()
call CinematicFadeCommonBJ(red, green, blue, duration * 0.5, tex, 100, trans)
call ContinueCinematicFadeAfterBJ(duration * 0.5, red, green, blue, trans, tex)
call FinishCinematicFadeAfterBJ(duration)
endif
[/code]

but how can i put this part in my trigger?
should i keep the normal BJ from the beggining or should i remove it with something else?
if so, how?
these parts are also BJ (red) so it look complicated to remove all of them with something else non BJ
 
These BJs are not bad at all as long as you don't need to use them in local blocks. As you can see, it's quiet troublesome to go back to natives-only for cinematic fades.

GetUnitsInRectAll is a bit less good, since you can't use filters with those BJs "GetUnits...", but still, if you have problem with the way jass handles groups, there is no problem using them.
 

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
actually i had to create a whole system to get around those evil function
[Jass=]
set udg_TempGroup = GetUnitsInRectAll(udg_Area[GetRandomInt(1, 9)])
call IssueTargetOrder( gg_unit_h02R_0618, "thunderbolt", GroupPickRandomUnit(udg_TempGroup) )
call DestroyGroup(udg_TempGroup)
[/code]

especially the "GroupPickRandomUnit"
i though it was a basic function, but it create 2 groups and do some kind of grouploop with unit marker...

i lucky got pass that by selecting all unit into a group, used the group for things in needed then filtered the group to keep unit i wanted,
then archived unit into a temp unit array, then selected a random integer from 1 to unit array max, and made Unit[integer] the target.
it is basically the same this little function does but if i do it myself i have total control over it, and can clean it more easily.
 
If I want to use functions like the bj functions do then I'll usually create my own function with the use off all off what I want to function from them, but all with natives. This way I can know what i am using a lot more.

If I use it only once with a 'call' the way I want I would just impend the code strait where I would use the call function instead of making a new one.
Else If I would use the function more than once I would do a total new setup in a new separate function.

I will give one or two examples when I get home. Right now I am at school. ;)
 
Status
Not open for further replies.
Top