HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

could anybody help me with this map

12-13-2013, 11:05 PM#1
andreasaspenberg
i have 2 different issues. one is a unit that cant be healed for some reason and the other is trigger related. please open the map and take a look at it for me. the trigger where i have created an example of what i want is named transform into gnome.(i tested several ways to make units keep items after transforming but they dont work.)
Attached Files
File type: w3xbam web mountains bugged2.w3x (2.6 MB)
12-13-2013, 11:40 PM#2
Anitarf
You need to provide more information for your first problem. Which unit can not be healed, under what circumstances?

For your second problem, can you post the trigger in this thread? I can't look at the map at the moment.
12-14-2013, 01:57 AM#3
andreasaspenberg
ok i can provide more information but please restore the reputation i lost because the website crashed. the unit that cant be healed is the obelisk. i changed it so that the cleric and paladin was supposed to be able to heal it but the healing spell cant even target it for some reason. i suspect that the issue is somewhere in the map but i dont know where.

Trigger:
transform into gnome
Collapse Events
Unit - A unit Begins channeling an ability
Collapse Conditions
(Ability being cast) Equal to transform into gnome new two
Collapse Actions
Custom script: local unit u
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Owner of (Triggering unit)) Current gold) Greater than or equal to 25
Collapse Then - Actions
Set temp_item = (Item carried by (Casting unit) in slot 1)
Player - Add -25 to (Owner of (Casting unit)) Current gold
Set Temp_Boolean = ((Triggering unit) is selected by (Owner of (Triggering unit)))
Unit - Order (Casting unit) to drop (Item carried by (Casting unit) in slot 1) at (Position of (Casting unit))
Unit - Replace (Casting unit) with a metapod using The old unit's relative life and mana
If (Temp_Boolean Equal to True) then do (Selection - Select (Last replaced unit) for (Owner of (Last replaced unit))) else do (Do nothing)
Custom script: set u = bj_lastReplacedUnit
-------- Wait --------
Wait 25.00 game-time seconds
-------- EndWait --------
Custom script: set udg_Temp_Unit = u
Set Temp_Boolean = (Temp_Unit is selected by (Owner of Temp_Unit))
If ((Temp_Unit is alive) Equal to True) then do (Unit - Replace Temp_Unit with a Gnome using The new unit's max life and mana) else do (Skip remaining actions)
If (Temp_Boolean Equal to True) then do (Selection - Select (Last replaced unit) for (Owner of (Last replaced unit))) else do (Do nothing)
Player - Add 25 to (Owner of (Last replaced unit)) Current lumber
Item - Move temp_item to (Position of temp_item)
Collapse Else - Actions
Game - Display to (Player group((Owner of (Triggering unit)))) the text: Insufficient mana
Set Temp_Boolean = ((Triggering unit) is selected by (Owner of (Triggering unit)))
Unit - Replace (Triggering unit) with a Basal Golem created from blood forge using The old unit's relative life and mana
If (Temp_Boolean Equal to True) then do (Selection - Select (Last replaced unit) for (Owner of (Last replaced unit))) else do (Do nothing)

Edited by Anitarf. Reason: Added trigger tags..
12-14-2013, 07:43 PM#4
Anitarf
Have you already tried using the Chaos morph ability to morph the unit? It seems to me like that'd be a better way to do this than removing the original unit and creating a new one.
12-14-2013, 11:40 PM#5
andreasaspenberg
chaos replace the unit after a specific research project have been completed. it isnt a research system i am after. it was you that helped me create this system. the system works but the problem is to make units keep items when they transform.
12-15-2013, 07:36 AM#6
Fledermaus
You can remove the research requirement and they transform as soon as the ability is added.

Quote:
Originally Posted by The Warcraft III Ability Guide
Sca1 (Chaos): Adding a chaos ability to a unit transforms it into the unit type specified in the target unit id field of the ability. This can be used to change any aspect like the proper name or the model of a unit in the game or simply in combination with channel to implement morphing spells. Don't forget to remove the tech requirements from custom chaos abilities. One problem of Chaos is that it adds the morphed unit's current armor, damage, health and mana bonus received from items, auras and srength, agility, intelligence to the stats of the resulting unit. That means it's not a very good idea to morph heroes using chaos until Blizzard fixes those bugs. Ordinary units can't be affected by items and hero stats, so the only problem are buffs received from auras. Those buffs can easily be removed before the conversion and are automatically added again afterwards so that's not a real issue.
Using ReplaceUnit is a bad alternative, the new unit wont be in any of the control groups it was previously in.
12-15-2013, 01:21 PM#7
andreasaspenberg
the units need to first transform into a metapod and then into a different unit. chaos would require 2 abilities for each transformation. it also wouldnt work the way i want because its effect is instant.(the unit stay in metapod form for a while before it transforms further.) anitarf helped me create the system i am currently using. another issue with using chaos would be that that would prevent the player from selecting what the unit transforms into.
12-15-2013, 09:13 PM#8
Fledermaus
Chaos into Metapod, wait (or better yet, use a timer) x seconds, then Chaos into the other unit?
What's wrong with requiring another Chaos per transform?

Quote:
Originally Posted by andreasaspenberg
another issue with using chaos would be that that would prevent the player from selecting what the unit transforms into.
I don't see how..
12-16-2013, 11:58 AM#9
andreasaspenberg
the way blood and magic works is that basal golems walk into range of a building and learns 3 or 4 spells. clicking on one of them consumes mana from the player and transforms the unit into a metapod for a while. after the unit have stayed as metapod for a while it becomes the unit the player ordered it to become.
01-02-2014, 09:05 PM#10
andreasaspenberg
i fixed the healing issue but the other one i still need help with.
01-03-2014, 10:05 AM#11
Anitarf
What precisely do you need help with? People here have suggested using the Chaos morph ability. Have you tried that?
01-03-2014, 07:03 PM#12
andreasaspenberg
the triggers that transforms the units are already working thanks to your help in the past. what i need help with however is to transfer the item the unit is carrying to the unit it transforms into.
01-03-2014, 09:30 PM#13
Anitarf
As was already suggested, the easiest and most robust way to get item transfer to work would be to morph the unit by using Chaos instead of removing and replacing it like you do now.

If you insist on doing it the hard way, then you'll need to drop and hide the items from the unit, store them in an item array and retrieve them from it later. Since multiple triggers can run at once, you'd need to either offset the position in the array where you store the items by 6 every time the trigger runs or use a local array.
01-04-2014, 01:27 PM#14
andreasaspenberg
chaos wouldnt work because of glitches in the upgrade triggers.(i dont however understand why you want me to use chaos when you supported my system in the first place.) the item system is rather simple though. there isnt any item stacks or item status. i just need something that gives the new unit the same type of item as the old one had.
01-10-2014, 05:32 PM#15
andreasaspenberg
i just tried it and i was right. chaos doesnt work like you suggest. the problem is that it can only be used once per trigger.