 |   |  |  |
| World Editor Help Zone Need help with Blizzard's World Editor? Ask general questions about its features and use in this forum. README! |
 |
11-21-2008, 01:12 AM
|
#1 (permalink)
|
AegisFang@USWest
Join Date: Aug 2007
Posts: 432
|
Starcraft bunkers! (counting units inside a burrow)
Ok, in my map basically I am trying to implement a starcraft bunker system. Only one type of unit can enter the burrows though so I figured I would just use Pheonix fire and have four separate ones that I can give the burrow depending on how many units are in it. Problem is I can't seem to find how to count units inside a burrow, and I can't find a event that will allow me to sense it. (there are alot of bunkers on the map so I dont think checking every once in a while would be a very effective strategy)
Somebody help me out.
|
|
|
11-21-2008, 07:14 AM
|
#2 (permalink)
|
User
Join Date: Apr 2008
Posts: 348
|
You need to use global variable array of type rct in event.
function Trig_T1_A takes nothing returns nothing set udg_Bunker [i ] = ( udg_Bunker [i ] + 1 )endfunction//===========================================================================function InitTrig_T1 takes nothing returns nothing set gg_trg_T1 = CreateTrigger ( ) call TriggerRegisterEnterRectSimple ( gg_trg_T1, udg_rct [i ] ) call TriggerAddAction ( gg_trg_T1, function Trig_T1_A )endfunction
|
|
|
11-21-2008, 07:50 AM
|
#3 (permalink)
|
valiant little mapper
Join Date: Nov 2006
Posts: 766
|
i'm using a system with items in my commandandconquer map, it creates an item in the bunkers inventory which has the pheonix fire ability, so 4 units inside -> 4 items
 bunker
 bunker leave
if you remove single units from the bunker use:
 unload one unit
__________________
When I come back from the mighty quest
I have no need for sleep or rest
I head to a tavern for a drink
And get so drunk I cannot think
A wench by my side and a jug of mead
These are the things that I most need
So I sit back and sing this song
And drink and party all night long
|
|
|
11-21-2008, 01:07 PM
|
#4 (permalink)
|
шαиτѕ τо gινе ιιοиэѕѕ ιυν
Join Date: Jul 2007
Posts: 3,651
|
Give them the Insect thingy.
|
|
|
11-21-2008, 10:49 PM
|
#5 (permalink)
|
User
Join Date: Jan 2005
Posts: 2,984
|
The best idea would be using dummy units with the same attacks than units that can enter, you create them when units enter and remove when they leave or bunker is destroyed.
__________________
Current project:
iTaLiaN WaRZ v1.0
Progress: ||||||||
|
|
|
11-22-2008, 12:26 AM
|
#6 (permalink)
|
AegisFang@USWest
Join Date: Aug 2007
Posts: 432
|
Hrmm... Day Elven maybe if there was a set amount of bunkers and I could manage each one, but there isnt, and that is still not a way to check how many units are in it. Besides, units can enter the bunker without going on it, and there is flying units, and bunkers are real close in some areas.
UreDe4d, that is exactly what I wanted to do and the a pretty good way of doing it, +rep, Thanks.
Locust units. Hmm, here I see too many options for exploits and glitches. And it is a bit wierd to manage. And I would still have the issue of seeing how many units there are in the bunker. I couldnt use area, because some bunkers could be really close... Hrmmm
Im gonna go with UreDe4d's way.
Will post back I get it working.
Side note, do you have issues if they tell two units to load in at the same time? Also, if I wanted to use abilities and not items, how would I tell how many units are already in the bunker? And how do you make an item so they cannot drop it? Oo or is there a way to hide inventory but still have it?
|
|
|
11-22-2008, 12:34 AM
|
#7 (permalink)
|
User
Join Date: Apr 2008
Posts: 348
|
You can hide your inventory only from other players (Gameplay Constants).
|
|
|
11-22-2008, 01:38 AM
|
#8 (permalink)
|
AegisFang@USWest
Join Date: Aug 2007
Posts: 432
|
Hmm, I may want to do that. Hmm, too bad you cant hide inventory from yourself, it could prove useful in many situations.
I got it working.
|
|
|
11-22-2008, 09:20 AM
|
#9 (permalink)
|
valiant little mapper
Join Date: Nov 2006
Posts: 766
|
2 important things, be sure the inventory ability you have doesn't make items drop upon death, and make the items undropable in object editor
__________________
When I come back from the mighty quest
I have no need for sleep or rest
I head to a tavern for a drink
And get so drunk I cannot think
A wench by my side and a jug of mead
These are the things that I most need
So I sit back and sing this song
And drink and party all night long
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|  |  |  |  |   |  |
|