Problem Here with Triggers

U

Unregistered

Guest
Ok I am making a map but I keep missing something and the triggers keep messing up, so I am pretty sure I need to use the switches but I seem to be missing the point about them

What I am trying to do is when you create a guy at point A he moves to another area which creates a dropship. Once at the dropship I have a few triggers like display text, wait, followed by Run AI Script enter dropship. Once the guys are in the dropship the dropship then moves to another area and unloads them, finally it returns back to where it came from. I can get the dropship to show up and get the guy in the dropship and even get them to move to point B. The problem is one of 2 things, either the dropships will keep popping up because I have the preserve trigger on, or when they get to point B they will not unload.

At one point I had it kind of working, but every now and then the entire process would not run very smoothly, so I decided to mess with it a bit and now I am not even thinking clearly. I kinda get switches and have used them before, but I feel like I am missing something which is messing things up. From what I have gathered switches are like bookends, they start something and they end something else. One other thing is what is the point of the toggle switch and the random? Help would be great because I have spent a couple hours now trying to figure this out and my head is beyond hurting right now.
 
C

Coop

Guest
hrm.. It would be easier if you attached ur map on your post so i could take a look or make an example of what you have or whatever.

Toggle switch will just do the opposite of what ur switch is on now. For instance if you have a switch already set and you make a trigger saying.. If you bring a unit here.. Toggle this switch it would just clear the switch and vice versa.
I have never used the random switch, never really noticed it heh. I'm curious about that 1 myself.
 
U

Unregistered

Guest
Ok I was messing around with it and this is what I have now:

-Condition-

Player 1 brings at least 1 men to "Point X"

-Actions-

Set 'switch 3'
Preserve Trigger

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

-Condition-

'switch 3' is set

-Actions-

Wait
Create 1 terran dropship at "point X" for player 1
display text
wait
run ai script "enter transport" at "point x"
wait
issue order to all terran dropship owned by player 1 at "point x" move to "point y"
clear 'switch 3'
preserve trigger

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

Like it is now the game will just keep making dropships and running them from "point x" to "point y," but it will pick up the units and drop them off. What I want it to do is everytime a new unit is brought to "point x" a dropship will load the guys and move them to "point y." As is, I can't seem to stop the trigger from making dropships once it is activated. I am sure it is probably something simple I am overlooking because I had it working before, just not perfect. When I had it working before if you had a couple of dropships going to "point y" before they would wait until the final dropship got there to unload.

If you can help that would be great because I am spending more time on this one thing than I would like to, thx.
 
U

Unregistered

Guest
The way I have it now after the dropship unloads it moves to "point z" and disapears, which works fine. At one point I though about making it so you could only have one dropship at a time going in this cycle, but figured it would hurt the game and there was not a good chance people would have 2 dropships going at the same time anyways. The only problem with the entire cycle is that once the trigger is started it won't stop, so I end up having a stream of dropships popping up going in circles with nothing in them. I am still messing with it, but I figured if you knew how to fix it easily then it would be a waste of my time to fool around with it any longer.
 
C

Coop

Guest
okay i been doin some tests on this and its actually pretty tough. My problem is that you can never detect when the dropship is actually unloaded unless u make a wait timer. So i made a wait timer, but now when u keep sending units to get picked up the ship will keep turning around to pick it up. When the ship is full u cannot be on the location or the ship will just keep trying to pick it up. Well i attached what i have done. It's not perfect but maybe you can fix it up and use it on ur map. I hope it helps.

P.S. When playing the map you need to bring the marine on the mud terrain to make the dropship appear. Test everything that a player might do when actually playing your map.
 

Attachments

  • dropship.scm
    43.2 KB · Views: 247
U

Unregistered

Guest
It's amazing how one word can spark something in your head and solve the problem. I read your post and when I read the word "wait" I remembered some of the trigger I originally had when it worked fine, and five minutes later I had it working perfectly again. Now when the units are moved to "point x" a dropship pops up, automaticly loads them, moves them to "point y," unloads then and moves to "point z." Now the trigger only works when there are guys standing at "point x," and if someone misses the dropship another one will pop up seconds after the one leaves and follow the x,y,z pattern. I will post how I did it because it's kinda neat that it works, and I am suprised as hell that I figured it out right off the bat before I deleted it and got myself into this problem.


-Condition-

"Player 1" brings at least 1 men to "Point X"
"Switch 1" is cleared

-Actions-

Wait
Create 1 terran dropship at "Point X" for "Player 1"
Display Text
Wait
Execute AI Script "Enter Transport" at "Point X"
Wait
Issue order to move all terran dropships owned by "Player 1" at "Point X" move to "Point Z"
Wait
Clear "Switch 3"
Preserve Trigger

I hope you did not spend a lot of time working on the problem, but at least you did help in some way in solving the problem.

I am having a little problem in that when the units get to "Point y" the text I have will go off once when it enters and once when it leaves. I am going to try and do the same thing with that trigger that I did with the other one and see if that works.

I am sure I will run into problems again, so I am glad I found this place. My biggest problem is that I want to do more than is possible with the present triggers available. When I finish the map I'll come in here and post it so the few people that show up can see the finished product. Thanks again.
 
U

Unregistered

Guest
The "Point Z" under -Actions- should read "Point Y."
 
C

Coop

Guest
Ahh. Im glad you got it working. I didn't work too hard on it, but besides, I learned something :). I usually no a little more about these triggers, i wasnt familiar with that whole thing there =/.

I am having a little problem in that when the units get to "Point y" the text I have will go off once when it enters and once when it leaves.
What text are you talking about there? If its appearing to many times you may have to use a switch and make a seperate trigger.
 
U

Unregistered

Guest
I only have the text once, but the drop-off area at "Point Y" is pretty large because I was afraid people would not move their guys and the dropships would not unload. I didn't try and work on it yet because I don't want to get involved and I know how hard to stop it is once you get going. If the clear trigger thing does not work then I will just try and shrink the "Point Y" area, which should hopefully solve the problem. If for some reason that does not work I probably will have to setup another switch so it does not say it twice, which shouldn't take that long as long as I don't flub things up again.
 
C

Coop

Guest
what is going on.. a whole bunch of posts were erased.. and one thread is "closed"..???
 
Z

zargamon

Guest
Or to piss people off do:

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

Action

When player ????? brings at least 1 ???? to location Y

Condition

End in defeat for current player
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top