[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > World Editor Help Zone


World Editor Help Zone Ask general questions about World Editor features and use in this forum. If you need help fixing a trigger, please post it in Triggers & Scripts. Please review the forum rules before posting.

Closed Thread
 
Thread Tools
Old 08-01-2007, 03:35 AM   #1 (permalink)
Registered User AussieLauren
User
 
Join Date: Jul 2007
Posts: 37
AussieLauren is an unknown quantity at this point (0)
Upgrading Shops

Dear all, Thank-you again for your help.

I am trying to have an upgradable shop, based off the arcane vault structure.

My problem is, when the unit upgrades, the new "items Made" don't show up. Instead, the old items remain. The new items do show up if the shop is built from scratch rather than upgraded.

1) Is there an object editor field I am looking over?
2) Assuming I have to use a trigger to remove the items made from the old unit when it is upgraded, how do i get this (in particular, what is the event? Tried Player-owned unit starts construction, starts an upgrade, neither seemed to fire)?

(P.S. I was originally trying to just remove the triggering unit and replace with the upgrade. will that work?)

Cheers,
Lauren

======================{EDIT}=========================
You know how, after several hours of trying to figure it out, you work it out about 15 minutes after you post for help?

Events
Unit - A unit owned by Player 1 Begins an upgrade
Conditions
(Unit-type of (triggering unit)) equal to UnitUpgrade
Actions
Unit - Kill (Triggering Units)
Unit - create 1 (unit-type of (Triggering unit)) at position of (Triggering unit) facing Default Building Degrees

(Or, as I suck at de-leaking GUI);
Jass:
function Trig_Upgrade_Actions takes nothing returns nothing
    local location l
    if GetUnitTypeId(GetTriggerUnit()) == 'h00C' then
    call KillUnit( GetTriggerUnit() )
    set l = GetUnitLoc(GetTriggerUnit())
    call CreateNUnitsAtLoc( 1, GetUnitTypeId(GetTriggerUnit()), Player(0), l, bj_UNIT_FACING )
    elseif GetUnitTypeId(GetTriggerUnit()) == 'h00A' then
    call KillUnit( GetTriggerUnit() )
    set l = GetUnitLoc(GetTriggerUnit())
    call CreateNUnitsAtLoc( 1, GetUnitTypeId(GetTriggerUnit()), Player(0), l, bj_UNIT_FACING )
    endif
    call RemoveLocation(l)
endfunction

//===========================================================================
function InitTrig_Upgrade takes nothing returns nothing
    set gg_trg_Upgrade = CreateTrigger(  )
    call TriggerRegisterPlayerUnitEventSimple( gg_trg_Upgrade, Player(0), EVENT_PLAYER_UNIT_UPGRADE_START )
    call TriggerAddAction( gg_trg_Upgrade, function Trig_Upgrade_Actions )

Last edited by AussieLauren; 08-01-2007 at 04:01 AM.
AussieLauren is offline  
Old 08-01-2007, 03:41 AM   #2 (permalink)
Registered User Krvan
User
 
Join Date: Aug 2007
Posts: 4
Krvan is an unknown quantity at this point (0)
I think that you have to make a new building.
Like, make another building with different items and then replace the old building with the new building when it is done constructing.
Im not sure though.
Krvan is offline  
Old 08-01-2007, 08:15 PM   #3 (permalink)
Registered User iron_warrior
Watch out, Dr. Wily!
 
iron_warrior's Avatar
 
Join Date: Jun 2004
Posts: 568
iron_warrior will become famous soon enough (104)iron_warrior will become famous soon enough (104)iron_warrior will become famous soon enough (104)
Neutral Building - Remove Tome of Experience from (Triggering unit)

I actually don't know if this works on player-controlled buildings, but all you'd have to do is whenever the building is upgraded, remove all the items from it.
__________________
iron_warrior is offline  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Trigger] Shared Shops tahku Triggers & Scripts 14 01-10-2008 08:47 PM
Shops FookinIdiot Map Development 14 04-11-2006 05:06 PM
Help with Removing Item from Shops Axxaer Map Development 1 12-19-2005 03:12 PM
items in shops squax Requests 8 11-28-2004 05:38 PM
Question about hero shops Modeler Map Development 5 08-31-2004 10:23 PM

All times are GMT. The time now is 04:32 AM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle