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

Problem with werewolfs

Status
Not open for further replies.
Level 4
Joined
May 29, 2008
Messages
92
Please help me!:cry:

I want to create unit that archer in a daytime and fast melee unit at night. I create a scripting spell, that replase one tipe of unit by another/. But the problem is that this unit after transformation:

:fp:stop to make up everithing until you gave new(so it could ruined attack or defense)
:fp:its removed from all group(i mean Shift(Ctrl)+number)

Please help me with this!!!

P.S. Sorry for my english
 
Last edited:
Level 4
Joined
May 29, 2008
Messages
92
Some more information:
I use WE Unlimited 1.20
Script spell code:

Transform in wolf
Events
Time - Every 0.01 seconds of game time
Actions
Unit - Replace (Random unit from (Units of type Werewolf)) with a Werewolf using The new unit's default life and mana

Transform in archer
Events
Time - Every 0.01 seconds of game time
Actions
Unit - Replace (Random unit from (Units of type Werewolf)) with a Werewolf using The new unit's default life and mana

(Both of this scripts a turned of and turn on only when time is come(8:00 for archer; 20:00 for wolf)
 
Level 21
Joined
Aug 9, 2006
Messages
2,384
It runs 100 times a second and keeps replacing random units on the whole map, in that speed they get continously replaced and replacing removes the replaced unit from the selection and removes every current order, you should pick all units of type of the archer on the map once if the night comes and replace it by a werewulf (not with a periodic event) and if the day comes pick all units of type werewulf with the archer.

If you can buy archers simply disable at night time the archer and enable the werewulf to be recruited and vice versa at day, so you cannot get a werewulf at day.

Hope i could help you.
 
Level 4
Joined
May 29, 2008
Messages
92
And one mor how to do if player start to build archer in a day time and night is come? If i disable archers it would stop building? Or not?
 
Level 4
Joined
May 29, 2008
Messages
92
No i want that you could start build unit anytime but it transformed into unit that should be at that time. If you start to buy archer at 17.50 and it completed at 18.10(example) you should have a WOLF not Archer when its completed.
 
Level 28
Joined
Mar 25, 2008
Messages
2,955
  • Events
    • Unit - A unit finishes training a unit
  • Conditions
    • (Trained unit) equal to *your unit*
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • 'IF'-Conditions
        • (In-game time of day) greater or equal than 18.00
      • 'THEN'-Aktionen
        • Unit - Replace (Trained unit) with *wolf* using new unit's hp and mana
      • 'ELSE'-Aktionen
Like this?

Another way would be to replace the training building after 18.00 with the one in which the units buildable at nights are set..
 
Level 4
Joined
May 29, 2008
Messages
92
I know so archer and wolf had one icon. So no problems! Axcept one! Watch after hand (or dog head?)
1)I take wolf in groop
2)Press crtl+1
3)choose hero (example)
4)day come and wolfs turn into archers
5)Press 1
6)NOBODY CHOSEN

THIS problem i ask you to help! Then after transformashin they forget all TASKS you gave to it! Imagine: You lose battle and you need to run. Time of day changed and werewolfs stop and go to fight again! They forget that you issue them to run. I need help whis THIS problems but not with there transformation
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Yes, because replacing units is the same as removing them and making new ones (I guess that's exactly how it works).

I would suggest you to use a skill like Avatar, the goblin hero skill, or the one of Illadin.
Simply disable the skill and hide it in a disabled spell book, then when you need it enable and order all of your units to cast.
 
Level 4
Joined
May 29, 2008
Messages
92
Again big thanks GhostWolf(first in my "knokdown" treat) I'll try thi Why I don't think about it first?!
 
Level 4
Joined
May 29, 2008
Messages
92
Redscores. You mistake becose you can enable and disable ability using trigger. So i can give ability to unit, use this and then jast remove it. Its simple.

Somebodt look n my double strike threat. Please
 
Status
Not open for further replies.
Top