wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > General Development
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 04-23-2013, 12:04 AM   #16
shenglong
User
 
Join Date: Apr 2013
Posts: 14

shenglong has little to show at this moment (0)

Default

Sorry,What's wrong with my sentence.my mother language is not English. I mean,first,I have a lot of footmans,and I created a unit array variable named U[ ].Second,I set U[1]=the footman 1,
set U[2]=the footman 2 until set U[n]=the footman n.Now,one of footmans trigger a event.My question is how to get the index of triggerunit.

Last edited by shenglong : 04-23-2013 at 01:27 AM.
shenglong is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 04-23-2013, 08:55 AM   #17
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,083

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by shenglong
Sorry,What's wrong with my sentence.my mother language is not English. I mean,first,I have a lot of footmans,and I created a unit array variable named U[ ].Second,I set U[1]=the footman 1,
set U[2]=the footman 2 until set U[n]=the footman n.Now,one of footmans trigger a event.My question is how to get the index of triggerunit.
Ah, I understand now.

One way would be to use a loop:
Trigger:
Actions
Collapse For each (Integer A) from 1 to 20, do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Triggering unit) Equal to U[(Integer A)]
Collapse Then - Actions
-------- Do your actions with U[(Integer A)] here. --------
Else - Actions

Another, more efficient method would be to use a hashtable. I haven't been able to figure out how to use those in GUI so the only examples I can give are in (v)JASS.
__________________
Anitarf is offline   Reply With Quote
Old 04-23-2013, 03:19 PM   #18
shenglong
User
 
Join Date: Apr 2013
Posts: 14

shenglong has little to show at this moment (0)

Default

Another question,there are some items on the map.I clicked on the item.it doesn't trigger event.how to get (reflex) (respond) the click item event.
shenglong is offline   Reply With Quote
Old 04-23-2013, 04:11 PM   #19
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,083

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

When you say "click", do you mean select the item or order a unit to pick up the item? There is no event for the former, but the latter should be detectable with this configuration:
Trigger:
ItemClickDetection
Collapse Events
Unit - A unit Is issued an order targeting an object
Collapse Conditions
(Issued order) Equal to (Order(smart))
(Target item of issued order) Not equal to No item
Actions
__________________
Anitarf is offline   Reply With Quote
Old 04-24-2013, 03:49 AM   #20
shenglong
User
 
Join Date: Apr 2013
Posts: 14

shenglong has little to show at this moment (0)

Default

I was referring to the former.Is there any way to achieve the former?

Last edited by shenglong : 04-24-2013 at 03:54 AM.
shenglong is offline   Reply With Quote
Old 04-24-2013, 08:29 AM   #21
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 604

Submissions (1)

Fledermaus has a spectacular aura about (134)

Send a message via MSN to Fledermaus
Default

Do you mean select the item while it's on the ground, or use the item?
Fledermaus is offline   Reply With Quote
Old 04-24-2013, 09:44 AM   #22
shenglong
User
 
Join Date: Apr 2013
Posts: 14

shenglong has little to show at this moment (0)

Default

What I mean is select the item while it's on the ground.
shenglong is offline   Reply With Quote
Old 04-24-2013, 11:18 AM   #23
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,083

Submissions (19)

Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)Anitarf has a brilliant future (883)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

As I said, there is no event for players selecting items so I see no way of detecting it.
__________________
Anitarf is offline   Reply With Quote
Old 04-24-2013, 04:00 PM   #24
shenglong
User
 
Join Date: Apr 2013
Posts: 14

shenglong has little to show at this moment (0)

Default

A unit suffered from the skill of Impale.why can't suffer the second on this Buff?
shenglong is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 11:48 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2013, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services