Revive Trigger
Moderator: Cheaters
-
- Member
- Posts: 53
- Joined: March 5th, 2008, 3:51 am
- Title: FOR PONY!
- Location: Canada
Revive Trigger
I am new to JASS, anyways I was wondering if someone could make a simple Hero dies remove one lumber revive hero at region, if player has no lumber defeat, so that I can deconstruct the trigger, please and thank you
Nerf Paper.
Scissors are fine.
Sincerely, Rock.
Scissors are fine.
Sincerely, Rock.
Spoiler:
-
- The Flying Cow!
- Posts: 2196
- Joined: November 2nd, 2007, 10:34 pm
- Location: Melbourne
Re: Revive Trigger
Here... This 'should' work.
Code: Select all
globals //Globals Variable Needed
trigger Made_By_Ozza=CreateTrigger()
endglobals
function Made_By_Ozzapoo takes nothing returns nothing
local player p=GetOwningPlayer(GetDyingUnit())
local integer i=GetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER)-1
if i==-1 then
call CustomDefeatBJ(p,"You got Pwn3d")
else
call SetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER,i)
endif
endfunction
function main takes nothing returns nothing
local integer i=0
loop
exitwhen i>11
call TriggerRegisterPlayerUnitEvent(Made_By_Ozza,Player(i),EVENT_PLAYER_UNIT_DEATH,null)
set i=i+1
endloop
call TriggerAddAction(Made_By_Ozza,function Made_By_Ozzapoo)
endfunction
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
AutoCP3 now available for free!
-
- Member
- Posts: 52
- Joined: January 10th, 2008, 6:29 am
- Title: Learning to Model
- Location: Shoreline, Wa
Re: Revive Trigger
Lol, I like how you set that when he's defeated, it says UGotPwn3d.
;D
niceeeeeeeeeeeeee
;D
niceeeeeeeeeeeeee
[blinking]lilmanbryan[/blinking] appreciates you reading this...
[blinking]Look Down...[/blinking]
[blinking]Look Up...[/blinking]
[blinking]Look Down...[/blinking]
Spoiler:
[blinking]Look Up...[/blinking]
-
- Forum Staff
- Posts: 926
- Joined: June 3rd, 2007, 8:03 pm
Re: Revive Trigger
You forgot to check if it's a hero.
Code: Select all
function HeroCondition takes nothing returns nothing
if IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)then
return true
endif
return false
endfunction
call TriggerAddCondition(trig,Condition(function HeroCondition)