Is there a way to make computers hold position? I know about making a location and if they leave it, move 'em back, but it would be a lot better if I didnt not have to do that (sorry for all the questions, but if I cant find it, here I am).
Well... you'd have to use a trigger, because SC is just annoying like that. Someone told me that if you want a unit to stay stationary, and not be able to move, you'd have to use a trigger that constantly teleports the unit to a null square. I'm not sure if that works but on SpellSword RPG, you control a Civilian: "Corpse" which is controlled by you yet you cannot move it. Yeah, theres several rpgs that disable commands. I need the unit to still be able to attack and use spells, but just cant move.
It's impossible to do a hold position. You can simulate it but it won't really be a "hold".
Neutral players move a lot less than computers players in general, if that counts for anything. Most of the time people just surround dark templars around units they need to stay put.
Hmm... Well, it has been done before. They just remove the move command from the list of commands that unit can do. I have seen it done before, an example would be the Lord of Haevens RPG, where the drones and other units could not move in the item area.
Set up a trigger to have centered onto the unit at all times! The location must be the same size as the unit (1 box)
Computer brings unit to anywhere
Center location on unit owned by computer
Preserve Trigger
Always
Order unit owned by comuter to move to location (following unit)
This will tell the unit to move to the location that it is already in. So it wil never leave!
QUOTE(damned_soldier @ Jun 10 2006, 09:40 PM)
Hmm... Well, it has been done before. They just remove the move command from the list of commands that unit can do. I have seen it done before, an example would be the Lord of Haevens RPG, where the drones and other units could not move in the item area.
[right][snapback]504182[/snapback][/right]
wtf, i've never heard of that and as far as i know its impossible without modding.
in any case, you're gonna need a trigger of some sort to keep them there. maybe disabling/enabling?
well, heres the thing. its a medic and i need to still be able to heal... thats the big problem...
Ok... you'll need 3 units
Example
- 1 Medic, 1 Civilian, 1 Tank
Make a 1x1 location
Place 1 Civilian inside that location
Whenever you want your medic to hold position do this...
Conditions:
Current player brings exactly 1 tank to "a certain location"
Actions:
Move 1 medic at "Town" to "1x1 location"
Preserve trigger.
That'll make your medic stop whenever a tank is in " a certain location"
*** 7-7 idea is good too
Switch # is set
centre loc on unit
teleport unit to loc
preserve trigger
Pyro_Maniak14 has the right idea. If you try to move (teleport) a ground unit to a location whose centre is unwalkable (eg a location on water), then the unit won't go anywhere, but it will stop moving. Combined with hypertriggers, this stops the unit from going anywhere. I'm pretty sure the unit can still attack and use abilities whilst it is not trying to move, but I'm not sure how much this method of 'holding position' interferes with its ability to attack or heal. The great thing about this method is that you can move all medics in a location at once, meaning that one trigger can make many units 'hold position' simultaneously.
7-7's method I think will make it almost impossible for the medic to heal, since it's so busy being told to move to itself.
CrazyNinja's method as written will simply teleport your medic next to the civilian... (but I think he was trying to do the same thing as I described above).
Pyro-Fire's method is like 7-7's, it'll stop a medic from moving, but it probably will stop it from healing too, I would think.
The unit isn't going to attack or do much of anything if its constantly being moved to the location that its in.
QUOTE(in_a_biskit @ Jun 11 2006, 07:05 AM)
CrazyNinja's method as written will simply teleport your medic next to the civilian... (but I think he was trying to do the same thing as I described above).
[right][snapback]504357[/snapback][/right]
Not next to the civilian, because the area is already occupied by it , making the medic unable to teleport..and not able to move
QUOTE(in_a_biskit @ Jun 11 2006, 08:05 AM)
7-7's method I think will make it almost impossible for the medic to heal, since it's so busy being told to move to itself.
[right][snapback]504357[/snapback][/right]
But the medic is being told to move to a location where it already is in the center of, so no moving will take place. The medic will still heal I believe! I am sorry, I may be wrong I cant test it!
So... Anyone have a good idea? This is really important... Currently, I have it so if it leaves, it gets sent back, but it really wastes a lot of time in which it could be healing...
QUOTE(7-7 @ Jun 11 2006, 10:23 AM)
But the medic is being told to move to a location where it already is in the center of, so no moving will take place. The medic will still heal I believe! I am sorry, I may be wrong I cant test it!
[right][snapback]504513[/snapback][/right]
Yeah.. it'll still heal
[attachmentid=19359]
it'll heal if the units are close... =/
Odd... I cannot download that file... It comes up as garble.
Can you just type the trigger please?
7-7's method didn't work. Pyro-Fire isn't right and mine didn't work either. Crazy Ninja's worked perfectly.
ADDITION:
Right click on it and choose 'Save Target As...'
When saving, put .scx on the end of 'Medic' and then where it says 'HTML Document' choose 'All Files'
Thanks pyro.
*Acquiring trigger and pasting into map...*
I'm not going to be able to try this though, I am going to need to get some testers to test my map for me...
(my disc is scratched and wont work... plus I doubt anyone here wants to give me a cd image)
ADDITION:
Is there a way to disable the Accelerators for specific triggers (these triggers that need to be unaffected are always running)
Accelerators? You mean hyper triggers?
You could use waits or death counters to make it so they only run so often.. but you can only use one wait at a time per player, so you will most likely have to use death counters. Just have it so the deaths of some unused unit is always being added by 1, and have a trigger like:
Current player suffers atleast 24 deaths of unit:
Set deaths of unit to 0, do all the actions you need.
Then it would only run every 2 seconds.
I need it to run every second. Would I instead set it to 12?
ADDITION:
How many hyper triggers are we talking about for this? just one?
QUOTE(damned_soldier @ Jun 11 2006, 02:47 PM)
I need it to run every second. Would I instead set it to 12?
ADDITION:
How many hyper triggers are we talking about for this? just one?
[right][snapback]504584[/snapback][/right]
Yes, 12 deaths = 1 second.
No, you need 3-5 copies of hyper triggers. I always do 3.
Allright, thanks alot. I'm closing this topic now.