[Spell] Box of Disguises

Status
Not open for further replies.
Level 4
Joined
Feb 9, 2010
Messages
48
Greetings Chaps and Chappetes.

I'm trying to create following spell/mechanic/something:

Box of Disguise (Spell Book), when opened, contains 8 spells, each being a 'disguise' spell that changes the model of unit into certain disuise unit. The 'disguised' unit works as mechanical critter, meaning enemy units will not auto-attack it on sight. Disguised unit can also cast spells on it's own and use a spell to change it's form back to original unit.

The problem I encountered is making the 'Disguise X' spell making the unit considered as 'critter' (Aka not being attack on sight). It appears I have to create a unit via 'mechanical critter' spell, which creates a random unit from critters group. However, I have regular creeps (Which I use for sth else) and those 'Disguised' units. Random unit from that group will not suit my purposes, as I need exact 'Disguise' for exact Disguise spell.

Any idea how to solve that problem?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,272
Does the mechanical critter "no auto target" mechanic apply to plain old normal critter units?

Otherwise do what Pyrogasm suggested and repeatedly spawn mechanical critters until you have 1 of each. Hide all of them, potentially in a map corner. When a disguise ability is used hide the base unit and then swap in the approiable hidden mechanical critter and unhide it. This critter could be modified by abilities to have health, mana and speed similar to that of the base unit as well as be given the unhide or possibly other disguise abilities. When unhide or any of the other disguise abilities is used then it changes to that appropriate hidden unit.

Will mess up control groups as well as unit variables and groups reference the unit unfortunately. The trigger side can potentially be fixed with a clever system of sorts to abstractly reference the current player disguise rather than an absolute unit.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Be wary and be sure to pick a color like black and change the transformed units color to it. This will guarantee that it is actually is disguised. For example, if it spawns a frog, its pretty well hidden as the background is always black, but if you use the rat, if a player selects the unit, the background of the portrait still corresponds to player color.
 
Level 4
Joined
Feb 9, 2010
Messages
48
Well, I think I got easier way to fix it:

One critter unit, and every else critter unit will be a neutral passive unit (So won't be able to be summoned from 'mechanical critter' spell). The critter unit will be able to upgrade into any of the disguises or neutral passive critters. Depending on what spell was used, it will save a corresponding variable and issue order for that summoned critter unit to upgrade into corresponding disguise/critter.

If you upgrade the unit from critter into diffrent one, it maintains it's 'neutrality'. Think it's a less of mess and memory size taken.

Thanks for the help guys.
 
Level 4
Joined
Feb 9, 2010
Messages
48
Sorry for the double post, but I encountered another problem.

To get the spell working, I'm spawning a dummy unit so it can use 'mechanical critter' spell. (Can't give the initial unit that spell, 'cause I need 8 diffrent 'disguise' spells). However, I can't seem to issue dummy unit to use that 'mechanical critter' spell.

Anyone know how to make a dummy unit use the 'mechanical critter' spell?
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
put the critter spell on a unit, then have a trigger with the event a unit is issued an order with no target.

call BJDebugMsg(I2S(GetIssuedOrderId())) this prints out a number, write it down


then use this to order the dummy
call IssueImmediateOrderById(whichUnit, thisNumber)
 
Last edited:
Status
Not open for further replies.
Top