Staredit Network

Staredit Network -> UMS Assistance -> Please help me correct this
Report, edit, etc...Posted by Still_MatiC on 2005-02-19 at 00:04:54
What I am trying to do is, whenever a dropship drops a unit, and the main unit(Current Player) is next to a gun trap (Player 12), the main unit will be given to player 12, and the gun trap will be given to the current player. Then when the dropship drops the same unit, the main unit will be given back to the current player, and the gun trap will be given back to player 12. I got only half of it working, when the dropship drops the same unit the second time to toggle it back to normal, everything remains the same, the current player still has the trap and player 12 still has the main unit.

Here is the trigger I set up when you try to toggle it back to normal
Trigger
Players:
¤ All Players
Conditions:
¤ Current Player brings 'unit' to 'ground' (Dropship dropping off the unit)
¤ Current Player commands exactly 1 Floor Trap
Actions:
¤ Give 1 'Main Unit' owned by Player 12 at 'Center Location' to Current Player (The center location is always centered on anymen in the playing field for the current player)
¤ Give 1 Floor Trap owned by Current Player at 'Center Location' to Player 12

Report, edit, etc...Posted by MindArchon on 2005-02-19 at 00:28:43
What I think your doing wrong is you might be doing something like this

Trigger
Players:
¤ Some Player
Conditions:
¤ Always
Actions:
¤ Center 'Center Location' on men owned by some player
¤ Preserve Trigger


Always centering a location on a unit, even when the user no longer owns the unit and owns the trap, therefore making the location center on the dropship, on on some unit that the player no longer has.

After looking a second time, are you always centering the same location for all the players in the arena?
Report, edit, etc...Posted by Still_MatiC on 2005-02-19 at 00:32:13
I have the location centered in the playing area, the dropship isn't anywhere near it, so it can't be centered on it. The location is centered only for the human force, using Current Player
Report, edit, etc...Posted by MindArchon on 2005-02-19 at 00:38:18
QUOTE(Still_MatiC @ Feb 18 2005, 10:32 PM)
I have the location centered in the playing area, the dropship isn't anywhere near it, so it can't be centered on it. The location is centered only for the human force, using Current Player
[right][snapback]148571[/snapback][/right]


However, if each player uses the same location, the location will be centered in a cycle for EVERY player.

Also, you may be trying to center it on a unit that is not there. Can you show me all the triggers you have that indicate any kind of centering?

Im not sure what the affects of centering a location on a unit that doesn't exist, but I've always assumed the location moved to the center of the map. I'm sure somebody else could tell you.
Report, edit, etc...Posted by BeeR_KeG on 2005-02-19 at 11:08:44
Try using a location to center on the players per player, that way it won't mess up between players and some players will have locations on their dropships and others don't.

Also try Centering the location on the dropship at Anywhere, instead of in a specific location.

Check your location heights.
Report, edit, etc...Posted by Still_MatiC on 2005-02-19 at 12:30:30
Why would I want to center a location on the dropship? When the unit is dropped to trigger the action, it is detected on a regular location. The center location is focused on the main unit, lets say a marine.


Trigger
Description:
Center Location Triggers
Players:
¤ Force 1
Conditions:
¤ Current Player Brings at least 1 men to 'Location 1'
Actions:
¤ Center Location '1' on men owned by Current Player at 'Location 1'
¤ Preserve Trigger




Trigger
Description:
Center Location Triggers
Players:
¤ Force 1
Conditions:
¤ Current Player Brings at least 1 men to 'Location 2'
Actions:
¤ Center Location '1' on men owned by Current Player at 'Location 2'
¤ Preserve Trigger



These two location will avoid centering on the dropship, because it is in neither location. This system works because I tried other triggering.

If it helps, this is the other half of the triggers (toggling the Current Player to control the floor trap) that works.

Trigger
Conditions:
¤ Current Player brings exactly 1 'Unit Being Dropped' to 'Ground'
¤ Current Player brings exactly 1 men to 'Floor Trap Location'
Actions:
¤ Give 1 men owned by Current Player at 'Center Location' to Player 12
¤ Give 1 Floor Trap owned by Player 12 at 'Floor Trap Location' to Current Player
¤ Preserve Trigger

Report, edit, etc...Posted by MindArchon on 2005-02-19 at 16:01:15
Try doing this to see if it works

Trigger
Conditions:
¤ Current Player brings atleast one "get back unit" to ground
Actions:
¤ Center Location 'turretishere' on machine gun trap at anywhere
¤ Give all machine gun turrets to p12 at 'turretishere'
¤ Give all 'urmen' to p1 at 'turretishere'


Just a question, does the main unit stay stationary once it is given to p12?
Report, edit, etc...Posted by Still_MatiC on 2005-02-19 at 21:27:29
yes, it stays stationary.

I can't center locations on turrets because there are several around the map
Report, edit, etc...Posted by MindArchon on 2005-02-20 at 00:04:48
QUOTE(Still_MatiC @ Feb 19 2005, 07:27 PM)
yes, it stays stationary.

I can't center locations on turrets because there are several around the map
[right][snapback]149176[/snapback][/right]


But if there's only one main unit, then it should cneter on the player's turret, which should be only one wink.gif

How many units do each player have?
Report, edit, etc...Posted by Still_MatiC on 2005-02-20 at 00:29:34
Oh your right, I misread what you typed. I thought u meant center it for P12 floor traps. Well I'll try the triggers out tomorrow.

Yea there should be one main unit or floor trap in the playing field for each player
Report, edit, etc...Posted by Still_MatiC on 2005-02-23 at 00:58:51
I am very sorry to double post, but I really wish someone had a solution to help me. I tried your triggers MindArchon, and the first set of the triggers that were working before became useless for some reason, I never receive the Turret and P12 never gets my main unit, its as if there was no trigger there in the first place. However, when I deleted the trigger, the first set of the triggers worked again.

Report, edit, etc...Posted by chuiu on 2005-02-23 at 01:56:58
Ok, if I understand what you need to do, you should try this:

uA for the guntrap unit.
uB for the giveback unit.
land a land only location on the field.
transform a 3x3 location to detect the changes.

C:
Current player brings at least 1 uA to land.

A:
Center location transform on uA owned by Current player.
Preserve trigger.


C:
Current player brings at least 1 uA to transform.
Current player brings exactly 0 uB to transform.
Player 12 brings at least 1 trap to transform.

A:
Give 1 uA at transform owned by Current player to Player 12.
Give 1 trap at transform owned by Player 12 to Current player.
Preserve trigger.

C:
Current player brings at least 1 uB to land.

A:
Center location transform to uB owned by Current player.
Preserve trigger.


C:
Current player brings at least 1 uB to transform.
Player 12 brings at least 1 uA to transform.

A:
Give 1 uA at transform owned by Player 12 to Current player.
Give 1 trap at transform owned by Current player to Player 12.
Run AI script "Enter transport" at transform.
Preserve trigger.

I did this with 4 triggers instead of two in case there is no land only location on the dropship. If you can get a land only location on the dropship (transform) then you can do this with 2 triggers, just delete the 1st and 3rd one.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-02-23 at 15:06:46
QUOTE(MindArchon @ Feb 18 2005, 11:38 PM)
However, if each player uses the same location, the location will be centered in a cycle for EVERY player.

Im not sure what the affects of centering a location on a unit that doesn't exist, but I've always assumed the location moved to the center of the map. I'm sure somebody else could tell you.
[right][snapback]148585[/snapback][/right]


I doubt the center location is the problem, its possable however if there is a unusual trigger order situation. But as long as the center location trigger falls before the give units trigger then it won't be a problem no matter how many players are using it.

I think the problem is because he does nothing to reset the conditions after he drops a unit from a drop ship. I'm assuming you have a trigger that constantly loads the units dropped unit back in the drop ship. The problem would be that when you drop a unit BOTH triggers fire. Because as soon as the first one finishes the conditions for the second are now true so it changes it back.

A simple way to tell if this is the is to have the unit selected when you try to change it back. If it deselects itself thats because it is changing players.

PS. This is a difficult thing to solve when you leave out all the important triggers and don't show the map. And i only skimmed though the other post.

Lastly mindarchon, if there isn't a valid unit for the location to center on then the location will move to the center of the area in which it was centered at (normally anywhere, which puts it at the center of the map).
Report, edit, etc...Posted by Still_MatiC on 2005-02-23 at 22:38:41
QUOTE(chuiu_os @ Feb 23 2005, 01:56 AM)

[color=gray]
C:
Current player brings at least 1 uA to transform.
Current player brings exactly 0 uB to transform.
Player 12 brings at least 1 trap to transform.

A:
Give 1 uA at transform owned by Current player to Player 12.
Give 1 trap at transform owned by Player 12 to Current player.
Preserve trigger.
[right][snapback]151450[/snapback][/right]



for this, why didn't you put uA instead of trap? Or did you mean uA as something else, because you wrote uA = Trap. I don't understand what's the point, because all it does is give me back the trap.
Report, edit, etc...Posted by chuiu on 2005-02-23 at 22:47:20
You said you were droping a unit to get the gun trap, then droping another unit to return the gun trap and regain the first unit, right? uA is the unit that gets the trap, and uB is the unit that gets uA back.
Report, edit, etc...Posted by Still_MatiC on 2005-02-23 at 22:54:25
nvm! I understand now
Report, edit, etc...Posted by chuiu on 2005-02-23 at 22:55:27
How about this:

QUOTE
What I am trying to do is, whenever a dropship drops uA, and uA(Current Player) is next to a trap (Player 12), uA will be given to player 12, and the trap will be given to the current player. Then when the dropship drops uB, uA will be given back to the current player, and the trap will be given back to player 12. I got only half of it working, when the dropship drops the same unit the second time to toggle it back to normal, everything remains the same, the current player still has the trap and player 12 still has uA.


I guess I read it wrong originally. I thought you were droping two different units at the time I made my post so that uA would be the first and uB would be the second one droped. How about this:

uA for the dropped unit.
land a land only location on the field.
transform a 3x3 location to detect the changes.

C:
Current player brings at least 1 uA to land.

A:
Center location transform on uA owned by Current player.
Preserve trigger.


C:
Current player brings exactly 1 uA to transform.
Player 12 brings at least 1 trap to transform.

A:
Give 1 uA at transform owned by Current player to Player 12.
Give 1 trap at transform owned by Player 12 to Current player.
Preserve trigger.

C:
Current player brings exactly 1 uA to transform.
Player 12 brings at least 1 uA to transform.

A:
Give 1 uA at transform owned by Player 12 to Current player.
Give 1 trap at transform owned by Current player to Player 12.
Run AI script "Enter transport" at transform.
Preserve trigger.
Report, edit, etc...Posted by Still_MatiC on 2005-02-23 at 23:43:19
I don't quite understand where you were going with those triggers. Perhaps I misunderstood, I tried those triggers to my understanding, and it didn't work. So I will post the map, and if you (or anyone) can clean my mess up, post the map, and explain what you did so I don't make the same mistake again, it'd be grateful.
Report, edit, etc...Posted by chuiu on 2005-02-24 at 02:16:40
No, I simply misunderstood what you were doing. I can't figure out why this wont work. I can get the trap, but I cannot return it. It's as if the trap isn't found at all by the triggers when the player owns them.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-02-24 at 03:08:19
QUOTE(Still_MatiC @ Feb 23 2005, 10:43 PM)
I don't quite understand where you were going with those triggers. Perhaps I misunderstood, I tried those triggers to my understanding, and it didn't work. So I will post the map, and if you (or anyone) can clean my mess up, post the map, and explain what you did so I don't make the same mistake again, it'd be grateful.
[right][snapback]151999[/snapback][/right]


Its just what i thought it was. The first trigger makes the conditions for the second true, the dropship unit doesn't load back in instantly so the conditions for the next trigger are true.

[center]
w00t.gif uberwoot.gif uberwoot.gif uberwoot.gif w00t.gif
2000th Post
w00t.gif uberwoot.gif uberwoot.gif uberwoot.gif w00t.gif
[/center]
Report, edit, etc...Posted by sckor on 2005-02-24 at 04:20:26
Just to confirm

(I really can’t do it as the trigger javascript soo… just tell me if its not clear enough)

Description – give units owned by human player to P12, give trap to current player

You can make the centering location if you want. I just made separate locations for each player arena.

Condition
*Current player commands at most 0 “gun traps”
*Current player brings at least one “unit” to “switch arena”
Action
*give “units” owned by current player at “switch arena” to P12
*give “gun traps” owned by current player at “switch arena” to current player
*preserve trigger.

Now, since you want to unload the “same” unit to give your unit back, what you do is this. Make a air only location over the drop ship. Let’s call this “air” Also, make a location in an another area called “load”

Description – load the same unit.

Condition
*Current player brings at most 0 “unit” to “air”.
*P12 commands at least one “unit”
Action
*Move all drop ships/shuttles/overlords owned by current player at “air” to “load”
*Create one “unit” at load
*Run ai script at location; enter closest transport
*Move all drop ships/shuttles/overlords owned by current player at “load” to “air”
*Preserve Trigger

There. Now between the actions, “create one “unit” at “load”” and “Run ai script at location….”, you might want to put a wait trigger just for a few milliseconds to be safe.

Description – Back to normal
Condition
*Current player brings at least one “unit” at switch arena
*P12 commands at least one “unit”
Action
*Give “guntrap” owned by current player to P12
*Give “unit” owned by P12 to current player
*Remove 1 “unit” at “switch Arena”
*Preserve trigger.

I hope.. this works.
Report, edit, etc...Posted by chuiu on 2005-02-24 at 13:12:25
QUOTE((U)Bolt_Head @ Feb 24 2005, 02:08 AM)
Its just what i thought it was.  The first trigger makes the conditions for the second true, the dropship unit doesn't load back in instantly so the conditions for the next trigger are true.

[center]
w00t.gif  uberwoot.gif  uberwoot.gif  uberwoot.gif  w00t.gif
2000th Post
w00t.gif  uberwoot.gif  uberwoot.gif  uberwoot.gif  w00t.gif
[/center]
[right][snapback]152070[/snapback][/right]

I noticed that too so I made them work off deaths also, if they suffer exactly 0 deaths run trigger and add 1 deaths. Then the deaths would only be set to 0 when the unit was back in the dropship. But for some reason it still wont work.

ADDITION:
OK I found the problem with the system I mentioned. You really didn't explain enough about what you were doing. I just noticed you made close to 50 triggers and locations for every trap on the map. This is not needed. I deleted your triggers (but not the locations) and finished the triggers I had in the map and it works perfectly.

Basically what happens in my version is ...

1. If you have suffered at least 1 deaths of operate/exit and the unit is in the shuttle it sets it to 0, preventing double swaping of unit/trap.
2. You drop operate/exit.
3. Transform is centered on the unit in the field (whether it is the hero or the trap).
4. If you have the trap, then the units swap and deaths are added to prevent the next trigger from running right after words because the unit doesnt go into the dropship fast enough.
5. If you have the hero then the units swap and the same thing with deaths.

[attachmentid=5490]
Report, edit, etc...Posted by Still_MatiC on 2005-02-24 at 18:24:50
chu thank you so much for fixing my map

credit will be given


topic closed
Next Page (1)