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



 
 
Thread Tools Search this Thread
Old 06-25-2010, 12:00 AM   #1
Zero
User
 
Zero's Avatar
 
Join Date: Aug 2002
Posts: 300

Zero has little to show at this moment (4)

Send a message via AIM to Zero Send a message via MSN to Zero
Default Making Computer Rebuild Killed Buildings

There is two triggers associated with the AI regarding this:

Trigger:
AI - Set the general rebuild count for player (Triggering player) Building to (Difficulty(0 / 2 / 14 / 14))
AI - Set the rebuild count for player (Triggering player) Unit Type to (Difficulty(0 / 2 / 14 / 14))

If you pre-place a building on the map and un-check the "initially created" option in the AI tab you have an option here to pick the rebuild count for that specific building as well.

There is these options:

Never / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / Always / Default (Never/Never)

What I don't understand is how to get the computer to actually REBUILD these structures if they die. I have all the pre-placed buildings set to always and even have the triggers above enabled. I've tried changing all of those numbers and nothing gets the computer to rebuild them. There is a check mark under which difficulty they should re-build it under and the only one is very easy as that's all there is. Does someone know how to make another difficultly option that you could set that too?

Now since I couldn't figure out to get this crap to work, I decided to make a trigger system instead.

Here it is:

Trigger:
Building Dies
Collapse Events
Unit - Supply Depot (Lowered) [31.00, 52.00] dies
Unit - Supply Depot (Lowered) [31.00, 50.00] dies
Local Variables
Conditions
Collapse Actions
UI - Display "Building Died!" for (All players) to Subtitle area
Collapse General - If (Conditions) then do (Actions) else do (Actions)
Collapse If
Collapse Or
Collapse Conditions
(Unit type of (Triggering unit)) == Supply Depot
(Unit type of (Triggering unit)) == Supply Depot (Lowered)
Collapse Then
Collapse General - If (Conditions) then do (Actions) else do (Actions)
Collapse If
(Number of Living units in (Any units in (Region((Position of (Triggering unit)), 35.0)) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount)) >= 1
Collapse Then
Variable - Set Position[1] = (Region((Position of (Triggering unit)), 1.0))
Variable - Set Structure[1] = (Triggering unit)
Collapse Else
Unit - Order (Random Living unit from Builders[1]) to (SCV - Build Supply Depot targeting (Center of (Region((Position of (Triggering unit)), 1.0)))) (Replace Existing Orders)
Else

The basic of this trigger pretty much says if a building is killed, and there is no enemy units withing a radius of 35, then rebuild. If there is units within that radius, store the unit and it's position into a variable so it can be rebuilt when there is no units within the area.

What I need help with, besides the questions I asked above this trigger, is how do I do the "THEN" conditions to where it stores the unit and it's position into a variable, not having to do an array value for each individual structure on the map?

Also, I already tired making the event be if ANY unit dies and setting a condition in an if statement to be the actualy pre-placed building on the map, but the trigger doesn't fire. It seems that in order for the map to register that building, it has to be in the event heading.

How do I simplify this, because I really do NOT want to have to make a array value for each building.
__________________
Zero is offline  
Sponsored Links - Login to hide this ad!
 


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 08:29 PM.


Donate

Affiliates
The Hubb http://bylur.com - Warcraft, StarCraft, Diablo and DotA Blog & Forums The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2014, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services