Da_HP_Geek
New Member
- Reaction score
- 8
I have been fiddling a bit with this trigger, but I cant get it to work. If a unit picks upp this item, it shall be blinded for 30 secods, but I cant get it work. Whats wrong?
Thx in advance!
Thx in advance!
Trigger:
- Infatuate Copy
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-class of (Item being manipulated)) Equal to (Item-class of Book 0103 <gen>)
- Actions
- -------- Some custom scripts that is necesarry, dont change them if you dont know what you are doing! --------
- Custom script: local player p = GetOwningPlayer(GetSpellTargetUnit())
- Custom script: if GetLocalPlayer() == p then
- -------- Walking over to cinematic mode and begin fading --------
- -------- At the end of the action below it says 0,0,0,100,0,0,0,0 this means: StartRed = 0, StartGreen = 0, StartBlue = 0, StartTransparancy = 100%, EndRed = 0, EndGreen = 0, EndBlue = 0, EndTransparancy = 0% --------
- Custom script: call CinematicFilterForPlayer(p, 0.25, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 100, 0, 0, 0, 0)
- Custom script: call ShowInterface(false, 0.25)
- Custom script: endif
- -------- Remember the target, so I can check some more stuffs --------
- Set TargetInfatuated[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
- -------- Disable the targets attack --------
- Unit - Add Cargo Hold (Orc Burrow) to TargetInfatuated[(Player number of (Owner of (Triggering unit)))]
- -------- Make the target to run away from the caster --------
- Unit - Add Wander (Neutral) to TargetInfatuated[(Player number of (Owner of (Triggering unit)))]
- -------- How long time then target is --------
- Game - Display to (Player group((Owner of Book 0103 <gen>))) for 30.00 seconds the text: Your fool! You pick...
- Wait 30.00 seconds
- -------- Remove Disable Attack --------
- Unit - Remove Cargo Hold (Orc Burrow) from TargetInfatuated[(Player number of (Owner of (Triggering unit)))]
- -------- Remove Wander --------
- Unit - Remove Wander (Neutral) from TargetInfatuated[(Player number of (Owner of (Triggering unit)))]
- Custom script: if GetLocalPlayer() == p then
- -------- Remove cinematic mode and reset fading --------
- -------- At the end of the action below it says 0,0,0,0,0,0,0,100 this means: StartRed = 0, StartGreen = 0, StartBlue = 0, StartTransparancy = 0%, EndRed = 0, EndGreen = 0, EndBlue = 0, EndTransparancy = 100% --------
- Custom script: call CinematicFilterForPlayer(p, 0.25, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0, 0, 0, 0, 100)
- Custom script: call ShowInterface(true, 0.25)
- Custom script: endif
- Custom script: set p = null
- Events
JASS:
function CinematicFilterForPlayer takes player whichPlayer, real duration, string tex, real red0, real green0, real blue0, real trans0, real red1, real green1, real blue1, real trans1 returns nothing
//if ( GetLocalPlayer() == whichPlayer ) then
call SetCineFilterTexture(tex)
call SetCineFilterBlendMode(BLEND_MODE_BLEND)
call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
call SetCineFilterStartUV(0, 0, 1, 1)
call SetCineFilterEndUV(0, 0, 1, 1)
call SetCineFilterStartColor(PercentTo255(red0), PercentTo255(green0), PercentTo255(blue0), PercentTo255(100-trans0))
call SetCineFilterEndColor(PercentTo255(red1), PercentTo255(green1), PercentTo255(blue1), PercentTo255(100-trans1))
call SetCineFilterDuration(duration)
call DisplayCineFilter(true)
//endif
endfunction