World Edit idea/question

User avatar

Topic author
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA
Contact:
Status: Offline

World Edit idea/question

Postby Ardis » Fri Nov 30, 2007 7:22 pm

Okay, I'm making a map that is basically supposed to have all of its own races and such, but I've run across a problem. I want to make a building behave much like the Zerg Hatchery/Lair/Hive in where it constantly produces a unit, but only if it has less than a certain amount. I've come up with a temporary solution, but it's not that great.
I'm not unstable.
Unstable implies that I could BECOME more dangerous than I am now.


tipereth
Zerg Hydralisk Nail Stylist
Zerg Hydralisk Nail Stylist
Posts: 599
Joined: Tue Sep 19, 2006 7:37 pm
Status: Offline

Re: World Edit idea/question

Postby tipereth » Sat Dec 01, 2007 10:42 am

The only way I can think of would be to use Pocket Factory and make the units last x times as long as the spawn time, but you would need a dummy unit.

User avatar

Mucky
Protoss Khalai Missionary
Protoss Khalai Missionary
Posts: 1037
Joined: Thu Aug 24, 2006 10:35 pm
Status: Offline

Re: World Edit idea/question

Postby Mucky » Sat Dec 01, 2007 12:57 pm

Here's something you can try instead of pocket factory:

Events
    Time - Every X seconds of game time
Conditions
Actions
    Player Group - Pick every player in (All players) and do (Actions)
        Loop - Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    ((Number of units in (Units owned by (Picked player) of type Footman)) / Y) Less than (Number of units in (Units owned by (Picked player) of type Town Hall))
                Then - Actions
                    Unit Group - Pick every unit in (Units owned by (Picked player) matching (((Unit-type of (Matching unit)) Equal to Town Hall) and ((Custom value of (Matching unit)) Less than Y))) and do (Actions)
                        Loop - Actions
                            Unit - Create 1 Footman for (Picked player) at (Position of (Picked unit) facing (Random angle) degrees
                            Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
                Else - Actions

X = whatever interval you want
Y = however many units you want to spawn per building

The custom value is what keeps the trigger from spawning footmen indefinitely. If a player has 0 town halls, this does nothing. If you want the town halls to replace footmen, you'll need to make a trigger that subtracts from their custom value like this one:

Events
    Unit - A unit Dies
Conditions
    (Unit-type of (Triggering unit)) Equal to Footman
Actions
    Unit Group - Pick every unit in (Random 1 units from (Units owned by (Owner of (Triggering unit)) of type Town Hall)) and do (Actions)
        Loop - Actions
            Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)

User avatar

Topic author
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA
Contact:
Status: Offline

Re: World Edit idea/question

Postby Ardis » Tue Dec 04, 2007 3:08 pm

Unfortunately, neither of those ideas helped because I don't want my game held together by triggers when it's done. And I seem to be having trouble with the pocket factory idea because when I try to upgrade the end unit into something else, some (but not all) of them would drop dead immediately.

I'll probably go ask the people who make Project Revolution to see if they have any suggestions.
I'm not unstable.
Unstable implies that I could BECOME more dangerous than I am now.


tipereth
Zerg Hydralisk Nail Stylist
Zerg Hydralisk Nail Stylist
Posts: 599
Joined: Tue Sep 19, 2006 7:37 pm
Status: Offline

Re: World Edit idea/question

Postby tipereth » Tue Dec 04, 2007 4:00 pm

Phantom wrote:Unfortunately, neither of those ideas helped because I don't want my game held together by triggers when it's done.


Then you're just screwed.

User avatar

Ricky_Honejasi
Xel'naga Solar Moderator
Xel'naga Solar Moderator
Posts: 2023
Joined: Wed Aug 16, 2006 3:50 pm
Status: Offline

Re: World Edit idea/question

Postby Ricky_Honejasi » Tue Dec 04, 2007 5:27 pm

tipereth wrote:
Phantom wrote:Unfortunately, neither of those ideas helped because I don't want my game held together by triggers when it's done.


Then you're just screwed.


Agreed, I really can't see a method without using triggers some way or another, Phantom.

Mucky's method is probably the least complicated way overall to trigger it. It's possible that his code might be buggy or that you didn't implant it correctly.

User avatar

X
Terran Refinery Attendant
Terran Refinery Attendant
Posts: 28
Joined: Thu Nov 09, 2006 6:29 pm
Status: Offline

Re: World Edit idea/question

Postby X » Sat Dec 08, 2007 12:15 pm

I can gurantee that if you dont trigger it...it wont be that good go with muckies.
I am X, I have seen countless worlds fall to great evils and their own foolishness, I have seen atrocities you cannot imagine, as well as things of incredible beauty of both the material world and of the spirit.

User avatar

Topic author
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA
Contact:
Status: Offline

Re: World Edit idea/question

Postby Ardis » Tue Dec 18, 2007 1:41 pm

Okay, I went back to my original idea which was just to purchase the unit with a max quantity.

Also, even though it sounds like an oxymoron, does anyone know a why to make a unit that can move over the terrain like a flying unit, but be targeted as a ground unit in combat?
I'm not unstable.
Unstable implies that I could BECOME more dangerous than I am now.

User avatar

Zilla-
Protoss Dragoon Shooting Target
Protoss Dragoon Shooting Target
Posts: 997
Joined: Thu Sep 07, 2006 8:28 am
Status: Offline

Re: World Edit idea/question

Postby Zilla- » Wed Dec 19, 2007 8:31 am

Phantom wrote:Okay, I went back to my original idea which was just to purchase the unit with a max quantity.

Also, even though it sounds like an oxymoron, does anyone know a why to make a unit that can move over the terrain like a flying unit, but be targeted as a ground unit in combat?


Will your map have other (legitemate) flying units? If not have the dudes be able to attack both ground and air.

User avatar

Mucky
Protoss Khalai Missionary
Protoss Khalai Missionary
Posts: 1037
Joined: Thu Aug 24, 2006 10:35 pm
Status: Offline

Re: World Edit idea/question

Postby Mucky » Wed Dec 19, 2007 9:03 am

Go down to where it says "Movement - Type" and set that to "None." The unit will bypass cliffs and such as a flying unit would but retain its ground status. I think it'll even walk over map boundaries. If you don't want that, you can try to set the movement type to "Fly," then go to where it says "Combat - Targeted as" and set that to ground. Not sure if either one of these will work to your liking.

User avatar

Milldawg
Zerg Defiler Nutritionist
Zerg Defiler Nutritionist
Posts: 733
Joined: Fri Aug 25, 2006 1:00 pm
Location: US
Contact:
Status: Offline

Re: World Edit idea/question

Postby Milldawg » Wed Dec 19, 2007 11:06 am

Try using the Undead Graveyard's ability, which produces corpses periodically (you can of course set it to something other than corpses).  I think I tried that once and it worked pretty well.

User avatar

Topic author
Ardis
Terran Nuclear Silo Safety Inspector
Terran Nuclear Silo Safety Inspector
Posts: 228
Joined: Tue Sep 05, 2006 5:03 pm
Location: Ohio, USA
Contact:
Status: Offline

Re: World Edit idea/question

Postby Ardis » Wed Dec 19, 2007 1:48 pm

Milldawg, the graveyard will only produce corpses to my knowledge, I know you can only set it to produce corpses of a different unit, though because my friend did that for a map he was making.
I'm not unstable.
Unstable implies that I could BECOME more dangerous than I am now.

User avatar

Milldawg
Zerg Defiler Nutritionist
Zerg Defiler Nutritionist
Posts: 733
Joined: Fri Aug 25, 2006 1:00 pm
Location: US
Contact:
Status: Offline

Re: World Edit idea/question

Postby Milldawg » Wed Dec 19, 2007 10:30 pm

Oh, maybe that's what I did, and then had them automatically revived into the appropriate unit (perhaps by simply giving such an ability to the graveyard itself).  In any case it could still be useful for what's-his-face's project.


Return to “WarCraft Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests