Scripting Metamorphose

A forum for discussing map making ideas and problems for the Myth series.
Post Reply
£N
Posts: 148
Joined: Thu Oct 25, 2007 2:38 pm

Scripting Metamorphose

Post by £N »

I am working on implementing a spell where a unit turns into another unit with a separate collection (in this instance it is a mage turning into a small flying beast, so he can traverse terrain unimpeded with greater speed to retreat if needed). I realize that this will require scripting, but I've no idea what. Fury mentioned that it was possible, but that's about all I've been able to glean. I would really only like to have this spell if it can be ensured that the new unit is transferred to the correct player, and not to the captain by default (as I've sometimes seen it occur).

Any help at all would be great, thanks!
A-Red
Posts: 771
Joined: Fri Jul 23, 2004 8:36 pm

Post by A-Red »

Well, if you have Amber the easiest way to do it is probably to combine the two collections into one. Then it won't matter how different they look, they'll technically be able to replace each other without issue.

If you don't, you would need to use a GEOM to find the location of your wizard unit, and send it as a "dest" into a MOMA action, which would send in the second creature to that location. It would help to stop your wizard unit, and even make him uncontrollable briefly, in order to be sure that it goes smoothly.

I know very little about scripting player control, as I only script solos. I know that you can script units to be detached to specific players--but as for using the script to figure out which player had control in the first place, I have no idea.
£N
Posts: 148
Joined: Thu Oct 25, 2007 2:38 pm

Post by £N »

Thanks, A-Red. Looks like I've got some investigating to do.
User avatar
TarousZars
Site Admin
Posts: 565
Joined: Wed Mar 31, 2004 9:15 pm
Location: Utah, USA
Contact:

Post by TarousZars »

I know ozone used the deciever spell to "change" unit types. The advantage of using charm is it always gives the new unit to the proper player.
User avatar
Fury IX
Posts: 254
Joined: Thu Oct 19, 2006 7:37 pm

Post by Fury IX »

Yea my idea was: (all theory of course)

1) Create a spell that when dropped detonates charm damage at the wizards feet, perhaps with a cloud of mist.

2) Have script test for that projectile, and then send in an enemy beast to the wizards spot. Then, the wizard disapears and the beast gets converted.

3) Create a spell for the beast to drop, and have script move the wizard to the beast and have the beast disapear and die (and repawn with script).

So basic script:

Geom: Test for Wizard spell
Moma: Move in evil beast
Ctrl: Evil Beast Visi
Ctrl: Wizard Invisi
Geom: Test for Beast spell
Moma: Move in Wizard
Ctrl: Wizard Visi (loop back to start)
Ctrl: Beast Invisi (Kill)
Image
Image
Souly
Posts: 187
Joined: Thu Dec 22, 2005 7:11 am
Location: South Africa

Post by Souly »

Due Dwl my map The9 vs The fallen Lords...Version1

Play with Cu Rio.. he turns into a FG.
£N
Posts: 148
Joined: Thu Oct 25, 2007 2:38 pm

Post by £N »

yeah souly, I remember that... I also remember that the FG is dispatched to the captain and not necessarily to the correct owner... is there a way to address that?
Zeph
Posts: 1019
Joined: Wed Apr 13, 2005 4:57 pm
Location: Montreal

Post by Zeph »

this is why fury's idea sound pretty neat to me
User avatar
Pyro
Bug Finder Extraordinaire
Posts: 4751
Joined: Sun Mar 21, 2004 2:14 pm
Location: Texas

Post by Pyro »

I have such an attack planned... but I am not on a Mac so I can't Amber. I plan on combining collections like A-Red suggested. It is better and more fluid than having an enemy attack and converted.

There is a way to give the unit to the right player. Using scripting and the "chrm" flag. I did that in Shiver's Turn. Where Murgen makes a copy of a unit and is given to the player who has Murgen. The only side effect to doing it with that script is that the captain will hear "Units Detached" and confuse him or her.
User avatar
haravikk
Site Admin
Posts: 987
Joined: Mon Mar 22, 2004 12:56 pm
Location: Scotland

Post by haravikk »

Your script would have to look more like:
GEOM - Detect Wizard's Spell (is an invisible projectile that sits doing nothing)
CTRL - Wizard uncontrollable (and maybe a GENE to stop for good measure)
ATTA - Charm beast (wizard as subj, beast as charm target)
MOMA - Move beast into place
CTRL - Wizard invisible
CTRL - Beast visible
GEOM - Detect Beast marker (I usually use an invisible projectile called "Marker" for these types of tests, tag is 'mark' that way =)
CTRL - Beast uncontrollable (again a stop is useful too after this)
MOMA - Move wizard into place
CTRL - Beast invisible
CTRL - Wizard visible
Being Haravikk gets you girls like these:
Image
User avatar
Fury IX
Posts: 254
Joined: Thu Oct 19, 2006 7:37 pm

Post by Fury IX »

I am not very good at fear, but does that mean that you cant make a marker that continuosly detonates charm damage for up to 2 seconds? I didnt try but I did try radius conversion, and that works. I have found that scripting player units to attack in general doesnt work very well (though it might work fine in this case). Also, youve got to be able to somehow kill the converted beast afterward, so he will respawn again as enemy for next time spell is cast.

And yea, I have a feeling no matter what you do it will say "units detached", and "new units recieved".
Image
Image
User avatar
haravikk
Site Admin
Posts: 987
Joined: Mon Mar 22, 2004 12:56 pm
Location: Scotland

Post by haravikk »

The conversion affect is only applied to a unit once, having it detonate continuously won't do anything except convert any other units that stumble across it.

The purpose of the marker projectile is to trigger the GEOM action and subsequently provide a location for the unit swap to occur, it doesn't really need to do anything as the charm effect is applied by the ATTA (attack) actions using the chrm flag, essentially simulating the charm effect, but with scripted control.
Being Haravikk gets you girls like these:
Image
£N
Posts: 148
Joined: Thu Oct 25, 2007 2:38 pm

Post by £N »

Thanks for the feedback yous guys. I plan on working on this really soon.
Souly
Posts: 187
Joined: Thu Dec 22, 2005 7:11 am
Location: South Africa

Post by Souly »

Your right, the fg did get despatch to the captin, but thats before i found out about the charm flag.


In the 9 v2, im not using the metamorp but insted im using summoning.

So you can do the metap spell and despacth it to the player that owns the caster...

Thing with editing collections, works the best.

Just waiting or pyro to proof to me that one can make the monster use entranch flag when the monster gets "override"
Post Reply