The official site of Clan TMMM
 
HomeHomeSearchUsergroupsFAQRegisterLog in


Latest topics
» Gotta click fast - WC3 Mazing #mildlyinteresting
by hoffmann Wed Jun 21, 2017 10:28 pm

» Hey whats up
by Eat_bacon_daily Mon Oct 10, 2016 6:24 am

» I'm getting married and you guys are invited
by Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
by Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
by Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
by Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

» What everyone been up to
by The_Chosen_Oreo Sun Jun 14, 2015 11:55 am

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
26%
 26% [ 8 ]
Warcraft 3
35%
 35% [ 11 ]
League of Legends
19%
 19% [ 6 ]
World of Warcraft
0%
 0% [ 0 ]
Diablo 2
0%
 0% [ 0 ]
No games at all
10%
 10% [ 3 ]
Other game not listed
10%
 10% [ 3 ]
Total Votes : 31
Transparency

Share | 
 

 Recepies Triggars HELP!

Go down 
AuthorMessage
Eat_bacon_daily
Captain
Captain
avatar


PostSubject: Recepies Triggars HELP!   Mon Jul 04, 2011 5:06 pm

I need to know a way to make a recepy trigger that has 2 times the same item in it.
Heres my current trigger
Spoiler:
 
Back to top Go down
Serenity09
Moderator
Moderator
avatar


PostSubject: Re: Recepies Triggars HELP!   Mon Jul 04, 2011 7:31 pm

so if you check if a hero has an item of one type, checking again to see if the hero has the same item type will return true whether the hero has 1 or 6 of those items

in order to get around this i'd probably


check if the hero has an item of whatever type
if they do: remove that item
check if they have another item of that same type
if they do: remove that item
check if they have the last item in the recipe
if they do remove that item and create the new thing/special effect
if they dont pass any of those conditions then make sure to give the unit their items back xD

(it'd also make sense to check to see if they had the iron forged sword before moving onto the gem's of frost (that way you don't have to remove the iron forged sword till the very end))

also dont use do nothing
if you want a trigger to do nothing, just leave the space blank
Back to top Go down
Eat_bacon_daily
Captain
Captain
avatar


PostSubject: Re: Recepies Triggars HELP!   Mon Jul 04, 2011 8:48 pm

Thanks for the tip about the do nothing. But your way of correcting it seems a lil unprofessional Razz. If there maybe another way? coz otherwise ima just make that recepy not work and write a note under the item (DO NOT BUY TWICE)
Back to top Go down
Serenity09
Moderator
Moderator
avatar


PostSubject: Re: Recepies Triggars HELP!   Mon Jul 04, 2011 10:42 pm

wait i thought the problem was that the recipe requires 2x of the same item except the check to see if you have the correct items registers 1x of that item as fulfilling the full recipe

in gui you'd probs need to fix it by removing 1x of that item and then checking to see if it still returns true (what i said above)
unless you can get the number of an item type in a heroes inventory

and its not unprofessional
its a necessary work around
you have to do this type of stuff a lot in gui, thats why i wanted to learn jass in the first place
the item wont actually really even be removed
the trigger will finish in an instant
but it might create a infinite loop where the trigger fires, an item is removed, readded, trigger fires again - if it does then this way won't

you could also enumerate through all the items in the heroes inventory checking to see if the recipe is fulfilled
Back to top Go down
Eat_bacon_daily
Captain
Captain
avatar


PostSubject: Re: Recepies Triggars HELP!   Mon Jul 04, 2011 11:13 pm

Naw i gave up, there wont be any recepies with 2x the same items Sad
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
avatar


PostSubject: Re: Recepies Triggars HELP!   Sun Jul 31, 2011 1:33 am

Hmm... I'm probally bringing up a dead thread... but just do a ForEach Loop as shown below

Back to top Go down
Sponsored content




PostSubject: Re: Recepies Triggars HELP!   

Back to top Go down
 
Recepies Triggars HELP!
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: