HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Morphing abilities, and Hero cam

07-17-2009, 02:19 AM#1
Super.gnome
I want to know 2 things.

First I'll start with Hero Cam. I see a bunch of 3rd person viewers that have the cam about a mile behind the hero. I want a hero cam that's closer to that of Hero wars Iceland, where its right behind the hero. And can be turned on and off at will.

Here's the gui, I'm trying to use. It works perfectly, but when I turn, it zooms back farther.

Trigger:
Hero Cam Main
Collapse Events
Player - Player 1 (Red) types a chat message containing -oncam as An exact match
Player - Player 2 (Blue) types a chat message containing -oncam as An exact match
Player - Player 3 (Teal) types a chat message containing -oncam as An exact match
Player - Player 4 (Purple) types a chat message containing -oncam as An exact match
Player - Player 5 (Yellow) types a chat message containing -oncam as An exact match
Player - Player 6 (Orange) types a chat message containing -oncam as An exact match
Player - Player 7 (Green) types a chat message containing -oncam as An exact match
Player - Player 8 (Pink) types a chat message containing -oncam as An exact match
Player - Player 9 (Gray) types a chat message containing -oncam as An exact match
Player - Player 11 (Dark Green) types a chat message containing -oncam as An exact match
Conditions
Collapse Actions
Set Herocam = (Current camera)
Set CamON[(Player number of (Triggering player))] = 1
Camera - Pan camera for (Triggering player) to (Position of PlayerMainHeros[(Player number of (Triggering player))]) over 1.00 seconds
Camera - Lock camera target for (Triggering player) to PlayerMainHeros[(Player number of (Triggering player))], offset by (0.00, -500.00) using Default rotation
Camera - Set Players[(Player number of (Triggering player))]'s camera Distance to target to 0.00 over 0.75 seconds
Camera - Set (Triggering player)'s camera Angle of attack to -20.00 over 0.75 seconds
Camera - Set (Triggering player)'s camera Rotation to (Facing of PlayerMainHeros[(Player number of (Triggering player))]) over 0.75 seconds
Camera - Set (Triggering player)'s camera Rotation to (Facing of PlayerMainHeros[(Player number of (Triggering player))]) over 0.75 seconds
Wait 0.50 seconds
Trigger - Run (This trigger) (checking conditions)


My second issue is that I want to know what I have to do in order to have an ability morph a hero into another "model" and keep the same stats and inventory. When I just change the metamorphosis model, the ability doesn't do anything.


Thanks.

Edited by Anitarf. Reason: Put the code in trigger tags..
07-17-2009, 10:41 AM#2
Anitarf
The last camera system that I saw would let you change the distance and angle of the camera as you wish.

The only way to morph a unit into another model is to morph it into a different unit, try making a copy of your hero in the object editor and change only his model, nothing else, then use this alternate version to morph to.
07-17-2009, 10:48 AM#3
Kueken
There is also a system around to change the skins ingame, using some crazy issues with the War Club ability and modified trees iirc. So just changing the skin is possible without meta.
07-17-2009, 06:05 PM#4
Super.gnome
I don't want to have a cam system that lets me change distance or angle. I actually want the opposite. I want to force the cam to stay where it is before I turn my hero. And I want to be able to have players turn it off and on with chat commands. Like in the "hero wars" line of custom games (Hero wars Iceland, Exiled, ect.) All I need is to know why it zooming back when I turn, and how to stop it.


On morphing, I want to know how to do it with Metamorphosis. I understand that I have to swap a new hero in with triggers, and then set that hero's stats to match the old hero's stats. So I'll have to save the hero as a variable, save his position as a variable, save his stats as variables, and then make a new hero at his position with stats matching the variables. Correct?
07-17-2009, 06:22 PM#5
Opossum
Quote:
Originally Posted by Super.gnome
I don't want to have a cam system that lets me change distance or angle. I actually want the opposite. I want to force the cam to stay where it is before I turn my hero.
You can easily tweak OppiCam down to that. Leave out the Keyboard Plugin and modify the constants as desired. You won't be able to control it then. Its anticlipping feature will still be active though. I don't see why you would want to deactivate that anyway.
You can also add a trigger to toggle the cam via chat command using the enable function.
07-17-2009, 07:30 PM#6
Super.gnome
I'm using it in a "Hero wars" type map where you get extra gold for having it on. If you are free to move it, there is no "increased difficulty" factor gained from it, and therefore everyone would use it, all the time, and the point of it is lost.

I also have no idea what I'm doing with Jass so I would be lost on how to do such things with the code.

If you could explain how to do the following, using it, I would do so:

Make it stationary, at a desired distance from the hero.
Enable it, and disable it using a chat command on a player by player basis (one player can have it on, another off)
and how to attach a income to it being on.

Then I would not only be very grateful, for forever in debt =D
07-20-2009, 06:33 AM#7
PotatoPeeler
Couldn't you just set the units model to nothing then add the sphere ability to the unit but setting the spheres model to the model of the unit. I'm pretty sure it wont have an animation though unless you put the animations into an invisible model that you make yourself, you could possibly export the model you want then remove all the skins from it or something. :S

EDIT: also there are third party programs that can reset the camera attributes to normal so that they can move it freely, so using such a trigger woule be a bad idea unless you set it every 0.01 seconds or something.
07-20-2009, 12:30 PM#8
Anitarf
Quote:
Originally Posted by Super.gnome
On morphing, I want to know how to do it with Metamorphosis. I understand that I have to swap a new hero in with triggers, and then set that hero's stats to match the old hero's stats. So I'll have to save the hero as a variable, save his position as a variable, save his stats as variables, and then make a new hero at his position with stats matching the variables. Correct?
You don't need to use triggers, just use a morph spell like metamorphosis or chemical rage. Not quite sure what part of that is giving you difficulties, as far as I remember morph abilities are really simple to modify.
07-21-2009, 01:38 PM#10
Super.gnome
Quote:
Originally Posted by Anitarf
You don't need to use triggers, just use a morph spell like metamorphosis or chemical rage. Not quite sure what part of that is giving you difficulties, as far as I remember morph abilities are really simple to modify.

The part that gives me difficulties is when I simply change metamorphosis to result in a different model (I think its Target Model File in the object editor) the ability fails to work at all when I test it. It simply takes the mana, starts its cool down and no "morphing" is ever done.

I will, however, try it again, as soon as I can.
07-21-2009, 02:39 PM#11
Anitarf
The morph abilities cannot change only the model, what they do change is the unit type: that's why you need two different units in the object editor, the basic form and the alternate form.
07-21-2009, 08:53 PM#12
Super.gnome
Quote:
Originally Posted by Anitarf
The morph abilities cannot change only the model, what they do change is the unit type: that's why you need two different units in the object editor, the basic form and the alternate form.

Yes. And I have, I believe, tried that. I will however try it again, and let you know.