• 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] Item bug

Status
Not open for further replies.
Level 10
Joined
Feb 20, 2008
Messages
448
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


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
 
Last edited:
Status
Not open for further replies.
Top