• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Dummy Ownership

Status
Not open for further replies.
Level 29
Joined
Oct 24, 2012
Messages
6,543
Let's say I have a dummy cast carrion swarm simultaneously for two different players. Do both deal damage to both players' enemies, or just the latest owner's?

They will attack units that are enemies of them. So if you create a carrion swarm for player 1 (player 3 is an enemy) it will attack player 3. Then player 2 (player 4 is an enemy) that carrion swarm will attack player 4.
This is normal for all spells I know of.

Also WC3 does not do anything simultaneously. It actually runs one thread at a time. It does this so fast that you think they run at the same time.
The reason it does this is to make coding with globals easier. (or because they were to lazy to multithread WC3)
By running one thread at a time you can continually reuse globals without having to worry about them overwriting each other. ( temp variables)
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
As long as the dummy cast the first one before the second then yes. This can be tricky as you will be moving the unit and facing the unit in a new direction. If the unit casts the first one then yes it will work fine but if the unit has to turn (units don't turn instantly) then it will switch owners before it has a chance to cast the first instance.

Effectively it will cancel the first command.
 
Status
Not open for further replies.
Top