Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED]2 problems
Report, edit, etc...Posted by Nquiksilver on 2006-08-17 at 23:19:52
One problem that I am having involves a location centering on a unit. the trigger is as follows
Trigger
Players:
¤ All Players
Conditions:
¤ Always
Actions:
¤ Center location labeled 'hostage1' on Hostage owned by Player 8 at 'Battlefield'
¤ Preserve Trigger


No the problem that I am having is that on map (in scmdraft) the location is 3/4 the way down the screen in the appropriate position. But, when it comes time to create the units at the location (when the countdown timer hits its point) (Note: no 'Hostage' on the map before this point on the countdown timer) the unit is created at the center of the map. Why is this? and how can I fix this problem? ...I think I may have come up with the solution while writing this, but ill write it out, because it may be wrong. I think I have to make a starting location to create it at, instead of it spawning at the location this is suppose to center on it. It appears as if it would work but ill edit this once I have tested it.

The second problem that I am having is having a unit gain control of a unit when it enters a location being centered on a unit (the one mentioned above). I had made an earlier post, but that was before all of the mess happened. I thought that Zealot101(sorry if I got it wrong) had figured it out, but it didn't, although it worked better than my first try. The problem is that I want it so that [any unit] can enter the location and gain control of the unit (converting it from P8's control to Current players) I can get this far, but now the trick is that I want it so that if the [any unit] leaves the location, ownership is given back to P8. The reason for this is because the 'Hostage' is invincible and when it reaches a certain location, the current team wins. But i don't want the other team killing the unit, or the current team to be able to walk it back freely. (Making a counterstrike cs_ style map). The reason I am asking this question is that I am using a variety of units and don't want to make the trigger for 14 different units. Is there a way to do this or am I going to have to do this for all of the units?
Report, edit, etc...Posted by Urmom(U) on 2006-08-17 at 23:32:08
First question: if you are trying to center a location on a unit that doesn't exist at the location(say it died or something) then it will center to the middle of the map (the middle of the location "anywhere". Too fix this you could try instead of always "Current Player brings at least 1 hostage to anywhere" or whatever location you want to use.

Second Question: Let me get some info. You want to give the units inside the location centered on the hostage to the current player? And then give the units outside of location being centered on the unit to player 8? Is player 8 a comp or a human? And can you post the link to the thread?
Report, edit, etc...Posted by Kenoli on 2006-08-18 at 05:35:14
QUOTE
Current Player brings Exactly 1 Hostage to 'hostage1'.
Current Player brings Exactly 1 [any unit] to 'hostage1'.
----------
Give 1 Hostage owned by Current Player at 'hostage1' to Player 8.
Second problem solution?
Report, edit, etc...Posted by Killer_Kow(MM) on 2006-08-18 at 07:22:18
With a preserve trigger.
Report, edit, etc...Posted by Nquiksilver on 2006-08-18 at 10:48:12
Heres a link to the previous thread
http://www.staredit.net/index.php?showtopi...48&#entry539448
Report, edit, etc...Posted by fritfrat(U) on 2006-08-18 at 11:26:08
Kenoli's trigger with a preserve trigger would accomplish what you wanted to do.

And you don't have to use a different location to create the unit at, just add the condition that Urmom stated to your center trigger; current player commands atleast 1 hostage.

It is out of character for me to make posts just to re-state what other people have said, but you hadn't mentioned that you had everything fixed, so I am just emphasizing what they said is right and will fix your problems.
Report, edit, etc...Posted by Nquiksilver on 2006-08-18 at 11:59:52
wow, thanks guys, both of the problems have been solved, but another one rises. Is there a way that if i give the hostage a command while it is under my control, so that once i lose control of it, the order initially given to it will be stopped and the unit will hold position? does that make sence, ill try to reword. As stated in my initial post, I wanted to be able to gain control of a neutral unit (the 'Hostage) when i eneter a specific location centered on it (solved). I made the unit invincible because i dont want the opposing team killing thier hostage, and without having consequences for doing so. Bu tthe problem is, that even when the hostage is not under my control, it will continue to follow out the order that i gave to it before i lost control of it. I am seeking a way to make it so that once i lose control and ownership reverts back to P8, that the unit will get a new order, in this case, hold position. Is there anyway to do this? I was looking through the AI Scripts and found "Set Generic Command Target" and "Clear Previous Combat Data". I tried the latter but found it did nothing. The trigger was when there is P8 commands exactly 1 Hostage at Location Hostage1, Clear previous combat data. and nothing appeared to happen when i tested it.
Report, edit, etc...Posted by Kenoli on 2006-08-18 at 12:07:45
Let me just update my trigger:
QUOTE
Current Player brings Exactly 1 Hostage to 'hostage1'.
Current Player brings Exactly 1 [any unit] to 'hostage1'.
----------
Preserve trigger.
Give 1 Hostage owned by Current Player at 'hostage1' to Player 8.
Issue order to all Hostage owned by Player 8 at 'hostage1': Move to 'hostage1'.
Report, edit, etc...Posted by Nquiksilver on 2006-08-18 at 12:17:17
wow... i cant believe that was all I had to do, i struggled with this for hours, and ask for some assistance and i get quick, correct responses... thanks guys, really appreciate the fast replys
Report, edit, etc...Posted by Zeratul_101 on 2006-08-18 at 12:32:43
QUOTE(Nquiksilver @ Aug 18 2006, 09:59 AM)
wow, thanks guys, both of the problems have been solved, but another one rises. Is there a way that if i give the hostage a command while it is under my control, so that once i lose control of it, the order initially given to it will be stopped and the unit will hold position? does that make sence, ill try to reword. As stated in my initial post, I wanted to be able to gain control of a neutral unit (the 'Hostage) when i eneter a specific location centered on it (solved). I made the unit invincible because i dont want the opposing team killing thier hostage, and without having consequences for doing so. Bu tthe problem is, that even when the hostage is not under my control, it will continue to follow out the order that i gave to it before i lost control of it. I am seeking a way to make it so that once i lose control and ownership reverts back to P8, that the unit will get a new order, in this case, hold position. Is there anyway to do this? I was looking through the AI Scripts and found "Set Generic Command Target" and "Clear Previous Combat Data". I tried the latter but found it did nothing. The trigger was when there is P8 commands exactly 1 Hostage at Location Hostage1, Clear previous combat data. and nothing appeared to happen when i tested it.
[right][snapback]546834[/snapback][/right]


just TELEPORT(AKA MOVE) the unit onto invalid terrain w/ preserve. the unit will be able to attack(if i remember correctly), but it won't be able to move. i don't think it can be attacked, but if its invincible, it doesn't matter anyways.
Next Page (1)