• 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.

[General] Some curious questions

Status
Not open for further replies.
Level 15
Joined
Oct 29, 2012
Messages
1,474
Hi , Would you answer this questions?:
1- How can I transfer all hero's abilities to another hero ? If the first hero has 2 abilities ( picked from shop ) they must go to the another hero . How?
2- How to detect local time ? I mean if Player 1 's local time is 15:53 (For Example) , the time in-game becomes 15:53 . And It cycles .
3-How do I detect that there is a doodad ( any doodad ) in front of a unit? By triggers please and in GUI if possible . Because I tried a way but it's very tough :/
4- There is an un******ted map named EPS , It's a free un*****ted version . Well , I saw in triggers that a timer can be ran in Map's initialization . LoL They are not meant to run in Map Init , How did that happen? Because the timer is sown in the start of the game normally.
5- I have buildings' upgrades that have no requirements . But I can't seem to click that upgrade . It's DISPTN and it shows details ( of gold cost ...etc 'tool-tip') . Well I checked Tech Requirements . It's blank . What happened ? Please Tell Me.

AND OF COURSE +REP
 
1) when a unit buys the ability store it into an array or a struct if u use vJass and key it to that unit.
Then load the abilities and give it to the other unit.

2) I don't think you can.

3) get destructibles in range then get unit facing and check with a certain degree of leeway. in an ITE you check the angle from unit to destructible. If the angles match then there is a destructible in front of the unit.

4) Thats very hard to read please change color next time. A timer can be created but not ran at map init. Its hard to say unless i see the code.

5) I'm not sure and didn't you make a thread on this already ?
 
1. When the hero gets the abilities from a shop, store it. For example, you could store the ability rawcode ID's (look them up in object editor, four-digit, such as 'A000') under 1 of Key(hero) for the first ability, 2 of Key(hero) for the second ability, etc.. in a hashtable. Then when you want to transfer the abilities, you just load the ability id's (integers) and add them. If you need an example, just ask and I'm sure someone will make it.

2. You can't detect local time. You can ask the player for the local time though, and have them give it through a chat message.

3. You can't check for a doodad, do you mean a destructible? If so, just make a rect around the unit and enum the units in that rect. Then you check if the angle between the destructible's position and the unit are approximately equal to the unit's facing angle + 180 (give or take 45 degrees).

4. Post the triggers. It might be a regular countdown timer. You might be confusing that with a timer dialog.

EDIT: Death beat me to the post. Pretty similar answers too. :D

P.S. I agree, the colors are blinding. You should just use regular text when asking questions.
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Tnx guys .
1- The abilities are just random . I just said an example of picking from shop :/ .
2- Ok xD
3- I understood :D
4- The test is bleu , i could'nt read it too Oo . I mean Countdown timer's window , it runs and counts , but the dialog isn't shown , but in EPS , The window is created in the map init , and it works Dx
5-Huh I know ther eis another thread , btw tnx.
all rep
 
Status
Not open for further replies.
Top