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



Reply
 
Thread Tools Search this Thread
Old 12-14-2013, 12:05 AM   #1
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default could anybody help me with this map

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: w3x bam web mountains bugged2.w3x (2.56 MB, 18 views)
andreasaspenberg is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 12-14-2013, 12:40 AM   #2
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

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.
__________________

Last edited by Anitarf : 12-14-2013 at 12:40 AM.
Anitarf is offline   Reply With Quote
Old 12-14-2013, 02:57 AM   #3
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

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..

Last edited by Anitarf : 01-03-2014 at 10:27 PM.
andreasaspenberg is offline   Reply With Quote
Old 12-14-2013, 08:43 PM   #4
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

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.
__________________
Anitarf is offline   Reply With Quote
Old 12-15-2013, 12:40 AM   #5
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

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.
andreasaspenberg is offline   Reply With Quote
Old 12-15-2013, 08:36 AM   #6
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

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.
Fledermaus is offline   Reply With Quote
Old 12-15-2013, 02:21 PM   #7
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

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.

Last edited by andreasaspenberg : 12-15-2013 at 02:32 PM.
andreasaspenberg is offline   Reply With Quote
Old 12-15-2013, 10:13 PM   #8
Fledermaus
default string
 
Fledermaus's Avatar
 
Join Date: May 2006
Posts: 705

Submissions (1)

Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)Fledermaus is a jewel in the rough (194)

Send a message via MSN to Fledermaus
Default

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..
Fledermaus is offline   Reply With Quote
Old 12-16-2013, 12:58 PM   #9
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

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.
andreasaspenberg is offline   Reply With Quote
Old 01-02-2014, 10:05 PM   #10
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

i fixed the healing issue but the other one i still need help with.
andreasaspenberg is offline   Reply With Quote
Old 01-03-2014, 11:05 AM   #11
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

What precisely do you need help with? People here have suggested using the Chaos morph ability. Have you tried that?
__________________
Anitarf is offline   Reply With Quote
Old 01-03-2014, 08:03 PM   #12
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

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.
andreasaspenberg is offline   Reply With Quote
Old 01-03-2014, 10:30 PM   #13
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

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.
__________________
Anitarf is offline   Reply With Quote
Old 01-04-2014, 02:27 PM   #14
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

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.

Last edited by andreasaspenberg : 01-04-2014 at 02:30 PM.
andreasaspenberg is offline   Reply With Quote
Old 01-10-2014, 06:32 PM   #15
andreasaspenberg
User
 
Join Date: Jul 2007
Posts: 149

andreasaspenberg is on a distinguished road (12)

Default

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.
andreasaspenberg 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 07:13 AM.


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