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 > Triggers & Scripts
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 03-02-2010, 10:20 PM   #1
Michael Peppers
Lepus?
 
Michael Peppers's Avatar
 
Join Date: Jan 2009
Posts: 1,308

Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)

Default Player losing control but not ownership of a unit

^That's my problem for tl;dr-ers.

Long version: I have a spell that causes units to do... things while the owning player can only watch and cry (or heal them or something).
Until now I used to change the ownership of the unit (to Neutral Victim, to be more precise), but I realized that this screws up being targeted by:

- Automatic enemies' attacks
- Friendly and enemy spells (auto-casts, AoE, Chain spells, spells with no target etc.)

I could always make Neutral Victim enemy for the owner of the caster and ally for the owner of the unit, but I can't avoid problems if this spell is cast by both the players, or even by all of the 12 players in a short amount of time.

Unfortunately, the only alternative I know to changing ownership is the yucky 'Aloc' (Locust), that makes the unit immortal and unselectable, hides its health bar, disables its collision (thus also pathability and GetUnitXYZWhatever()) and cancels its formation value.

So... ideas? Systems? Scripts? Abilities?
__________________
Projects:Tutorials: Competitive AI Step by Step with AI Editor (Pending)
Resources: [AI Script] Michael Peppers's Melee AI template (Pending)

Last edited by Michael Peppers : 03-02-2010 at 10:36 PM.
Michael Peppers is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 03-02-2010, 10:36 PM   #2
Kueken
User
 
Join Date: Mar 2009
Posts: 149

Kueken will become famous soon enough (41)Kueken will become famous soon enough (41)

Default

Add ward classification at runtime and catch smart order. Ward blacks out the command card, so the unit can only be issued right click orders, which you catch by trigger and reissue the previous order (eventually using RisingDusks LastOrder system or storing the orders manually)

Last edited by Kueken : 03-02-2010 at 10:38 PM.
Kueken is offline   Reply With Quote
Old 03-02-2010, 10:43 PM
Michael Peppers
This message has been deleted by Michael Peppers. Reason: For a BUMP
Old 03-03-2010, 12:28 PM   #3
Michael Peppers
Lepus?
 
Michael Peppers's Avatar
 
Join Date: Jan 2009
Posts: 1,308

Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)

Default

Quote:
Originally Posted by Kueken
Add ward classification at runtime and catch smart order. Ward blacks out the command card, so the unit can only be issued right click orders, which you catch by trigger and reissue the previous order (eventually using RisingDusks LastOrder system or storing the orders manually)
Duh! Didn't think about ward... intriguing. What if I try to disable "Smart" of the unit via triggers?

(Cookie, btw =D)

EDIT: Okie, either it doesn't work or I didn't understand how to set a unit as a Ward... can you post some code?
__________________
Projects:Tutorials: Competitive AI Step by Step with AI Editor (Pending)
Resources: [AI Script] Michael Peppers's Melee AI template (Pending)

Last edited by Michael Peppers : 03-03-2010 at 12:29 PM.
Michael Peppers is offline   Reply With Quote
Old 03-03-2010, 12:58 PM   #4
Kueken
User
 
Join Date: Mar 2009
Posts: 149

Kueken will become famous soon enough (41)Kueken will become famous soon enough (41)

Default

0_O setting ward classification at runtime does not seem to work, at least there is no UNIT_TYPE_WARD or something in the constants (did not know this, sorry). Maybe you have to set it in the object editor manually (if you need it temporarily, try using chaos from a non-ward version to a ward version of the same unit)

Last edited by Kueken : 03-03-2010 at 12:58 PM.
Kueken is offline   Reply With Quote
Old 03-03-2010, 01:14 PM   #5
Michael Peppers
Lepus?
 
Michael Peppers's Avatar
 
Join Date: Jan 2009
Posts: 1,308

Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)Michael Peppers is a jewel in the rough (188)

Default

Quote:
Originally Posted by Kueken
0_O setting ward classification at runtime does not seem to work, at least there is no UNIT_TYPE_WARD or something in the constants (did not know this, sorry).
No worries, I didn't know that too...
Quote:
Originally Posted by Kueken
Maybe you have to set it in the object editor manually (if you need it temporarily, try using chaos from a non-ward version to a ward version of the same unit)
As long as Chaos would surely work, I'd have to set a Chaos for every unit, both standard and custom ones... nay, that'd be an overwhelming task. =/

EDIT: Problem solved.
__________________
Projects:Tutorials: Competitive AI Step by Step with AI Editor (Pending)
Resources: [AI Script] Michael Peppers's Melee AI template (Pending)

Last edited by Michael Peppers : 03-05-2010 at 12:41 AM.
Michael Peppers 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 02:26 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

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