Staredit Network

Staredit Network -> UMS Assistance -> Removing a supply depot and creating rines help
Report, edit, etc...Posted by spikemonchi on 2007-01-13 at 17:17:31
ok after spending numerous long hours on this trigger... i found it necessary to ask for help.

I want to make it so when i build a supply depot, it swaps out for 3 marines and one Jim raynor marine.

Basically the trigger would remove the supply depot and create the marines.

The trigger i am currently using is a series of triggers that look like this.

Condition:
Always();


Action:
Comment("Marine Force 1");
PreserveTrigger();
MoveLocation(Location 6, Marine Force, CurrentPlayer, Location 9);


#2
Condition:
Bring(CurrentPlayer, AtLeast, 1, Marine Force, Location 6);

Action:
Comment("Marine Force 2");
PreserveTrigger();
Wait(1000);
MoveUnit(1, The Mayor, CurrentPlayer, Location 6, Player one SCV Spawn);
RemoveUnitAtLocation(1, Marine Force, CurrentPlayer, Location 6);
CreateUnit(3, Military Man Regular, Marine Spawn p1, CurrentPlayer);
CreateUnit(1, Gatling Gun, Hero spawn p1, CurrentPlayer);


#3
Condition:
Bring(CurrentPlayer, Exactly, 3, Military Man Regular, Marine Spawn p1);
Bring(CurrentPlayer, Exactly, 1, Gatling Gun, Hero spawn p1);

Action:
MoveUnit(3, Military Man Regular, CurrentPlayer, Marine Spawn p1, Location 6);
MoveUnit(1, Gatling Gun, CurrentPlayer, Hero spawn p1, Location 6);
PreserveTrigger();
Comment("Marine Force 3");


#4
Condition:
Bring(CurrentPlayer, AtLeast, 3, Military Man Regular, Location 6);
Bring(CurrentPlayer, AtLeast, 1, Gatling Gun, Location 6);

Action:
Wait(10);
MoveUnit(1, The Mayor, CurrentPlayer, Player one SCV Spawn, Location 6);
PreserveTrigger();
Comment("Marine force 4");


Trigger number 4 is designed to move the scv back to its original location at the end of the trigger.

Name Swaps:

THE MAYOR= SCV
MARINE FORCE= supply depot
MILITARY MAN REGULAR= marine
Gatling gun= Jim raynor

This trigger has a problem saying it cannot place the units in the location. then it says building exit is blocked... i think it is because of the scv.

If anyone can submit a correct trigger for this or fix the ones ive given it will be very appreciated.

Thanks
Report, edit, etc...Posted by EcHo on 2007-01-13 at 17:32:54
Wow, next time dont paste triggers like that.
You mind giving us a legend for what the locations represent?

Btw the problem might be the terrain, and if it is a scv, you should move it to somewhere far and if there is no supply depot at the location you should bring the scv back and then create marines.
Report, edit, etc...Posted by FatalException on 2007-01-13 at 17:39:29
Attaching the map would help... I noticed that you put the Preserve Trigger action second in trigger #2. It still works like that?
Report, edit, etc...Posted by Koltz on 2007-01-13 at 17:57:35
Bring currentplayer at least 1 Supply depot anywhere

-----------------------

Center location '1' onto supply dept

Remove supply depot for currentplayer at '1'

Create 3 marine at '1'

Create 1 Jim Raynor at '1'

preserve


-----------------------

If you do this, make sure u can only have 1 scv, Because buildings that ARENT done (in process) will be exchanged if one of completed to the right of them
Report, edit, etc...Posted by Felino on 2007-01-13 at 17:59:06
QUOTE
Comment("Marine Force 2");
PreserveTrigger();
Wait(1000);
MoveUnit(1, The Mayor, CurrentPlayer, Location 6, Player one SCV Spawn);
RemoveUnitAtLocation(1, Marine Force, CurrentPlayer, Location 6);
CreateUnit(3, Military Man Regular, Marine Spawn p1, CurrentPlayer);
CreateUnit(1, Gatling Gun, Hero spawn p1, CurrentPlayer);


This trigger would not work under any circumstances.

Easiest Way.


Trigger
Description:
1
Players:
¤ Current Player
Conditions:
¤ Current Player brings 1 Supply Depo to (location)
Actions:
¤ Centre location (Any location of 2x3, we will call it Same as before.)
¤ Move 1 SCV owned by current player to (tempory location)
¤ Remove 1 Supply Depo at (Same as before)
¤ Create one Jim reynor at (Same as before)
¤ Create 3 Marines at (Same as before)
¤ Move 1 SCV owned by current player at (tempory location) to (Same as before)
¤ Preserve Trigger
Report, edit, etc...Posted by fritfrat(U) on 2007-01-13 at 18:28:09
Hmm.. you could have done it in 1 trigger just like Felino recommended, and it would have been much simpler if you did, including avoiding whatever bug you made.

Clarify your bug, though, if you don't want to just remake it as what felino recommended. Does the supply depot get removed and then you get unit unplacable for the 4 men? How big is the location 6? Is the scv moving back?
Report, edit, etc...Posted by Felino on 2007-01-13 at 18:32:04
Because if it was moving back, into the location, you would proaby get the unit unplacable. If you wanted, you could make the location 4x8, rembering that trigers in a location always happen in the middle. This might work, only is there are no other supply depots within that location.

Good Luck
Report, edit, etc...Posted by spikemonchi on 2007-01-13 at 18:34:11
i get unit unplaceable for the marines... like you said. and the scv wont warp back.. im going to try felinos and see if it works.
Report, edit, etc...Posted by Felino on 2007-01-13 at 18:35:27
happy.gif
Report, edit, etc...Posted by spikemonchi on 2007-01-13 at 18:45:52
thanks loads felino it works now:-).



Just one more question.

my trigger i use for mins in the map... goes to fast...

should i just put a wait(Number) in?
Report, edit, etc...Posted by Felino on 2007-01-13 at 19:35:09
Mins? Can you explain this and your map to me? Thanks.

You can, if you want do somthing called kills for cash. This says the following.
eg, 10 kills = 20 minerals, or the like. If you want to know how we, or I can explain.
Report, edit, etc...Posted by green_meklar on 2007-01-13 at 19:46:00
QUOTE
Condition:
Always();


Action:
Comment("Marine Force 1");
PreserveTrigger();
MoveLocation(Location 6, Marine Force, CurrentPlayer, Location 9);


#2
Condition:
Bring(CurrentPlayer, AtLeast, 1, Marine Force, Location 6);

Action:
Comment("Marine Force 2");
PreserveTrigger();
Wait(1000);
MoveUnit(1, The Mayor, CurrentPlayer, Location 6, Player one SCV Spawn);
RemoveUnitAtLocation(1, Marine Force, CurrentPlayer, Location 6);
CreateUnit(3, Military Man Regular, Marine Spawn p1, CurrentPlayer);
CreateUnit(1, Gatling Gun, Hero spawn p1, CurrentPlayer);

Okay, I'd condense this into one trigger, like this:

Affects:
Force 1
Conditions:
Current player commands at least one terran supply depot
Actions:
Center location labeled 'Create marines' on terran supply depot owned by current player at Anywhere
Remove 1 terran supply depot at Create marines for current player
Move all terran SCV for current player at Anywhere to SCV spawn
Create 3 terran marine at Create marines for current player
Create 1 Jim Raynor at Create marines for current player
Move all terran SCV for current player at SCV spawn to Create marines
Preserve trigger

And in fact, if I have correctly interpreted the effect you're trying to create, I think this is the only trigger you'll need. However it may have to modified if, for example, you can have more than one SCV at once.
QUOTE
I noticed that you put the Preserve Trigger action second in trigger #2. It still works like that?

Yes, it doesn't matter where in the trigger the preserve trigger action is, it goes on working.
QUOTE
i get unit unplaceable for the marines...

That's strange. Two things I can suggest are one, making Location 6 bigger, or two, having a wait between the supply depot vanishing and the marines appearing.
QUOTE
my trigger i use for mins in the map... goes to fast...

should i just put a wait(Number) in?

If you're using hyper triggers, that probably won't work. Instead, use a counter. Have a set of triggers like this:

Affects:
Force 1
Conditions:
Always
Actions:
Modify death count for current player: Add 1 deaths of cantina
Preserve trigger

Affects:
Force 1
Conditions:
Current player has suffered at least 5 deaths of cantina
Actions:
Modify death count for current player: Set to 0 deaths of cantina
Modify resources for current player: Add 1 ore
Preserve trigger

The '5' in that second trigger means that you will get minerals once every five times the triggers run. You can edit this number as you please to set different times. As far as I know, hyper triggers using 0 millisecond waits will cause the triggers to fire approximately eight times a second, so you can determine how fast players get resources fairly precisely this way.
Next Page (1)