I have this trigger that been made so poepel wdont use mroe than 1 ticket(item)!!!
bug: evrytime that i dropped the ticket or give to some1 else , i cant take a new ticket or old ticket!! so the result make that im stuck in heaven (ticket used 2 revive) maybe some1 could saw whats wrong i tryed some thing and none worked :/ im not very familiar with jass
bug: evrytime that i dropped the ticket or give to some1 else , i cant take a new ticket or old ticket!! so the result make that im stuck in heaven (ticket used 2 revive) maybe some1 could saw whats wrong i tryed some thing and none worked :/ im not very familiar with jass
JASS:
function Trig_One_Ticket_Only_Func003C takes nothing returns boolean
return((GetOwningPlayer(GetManipulatingUnit())==Player(0)))or((GetOwningPlayer(GetManipulatingUnit())==Player(1)))or((GetOwningPlayer(GetManipulatingUnit())==Player(2)))or((GetOwningPlayer(GetManipulatingUnit())==Player(3)))or((GetOwningPlayer(GetManipulatingUnit())==Player(5)))or((GetOwningPlayer(GetManipulatingUnit())==Player(6)))
endfunction
function Trig_One_Ticket_Only_Conditions takes nothing returns boolean
return((GetItemTypeId(GetManipulatedItem())=='I01X'))and(Trig_One_Ticket_Only_Func003C())
endfunction
function Trig_One_Ticket_Only_Func001C takes nothing returns boolean
return((GetUnitUserData(GetManipulatingUnit())==1))
endfunction
function Trig_One_Ticket_Only_Actions takes nothing returns nothing
if(Trig_One_Ticket_Only_Func001C())then
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call TriggerSleepAction(1.00)
call UnitRemoveItemSwapped(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(),'I01X'),GetManipulatingUnit())
else
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call TriggerSleepAction(1.00)
call SetUnitUserData(GetManipulatingUnit(),1)
endif
endfunction