Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Replicating Triggers
Replicating Triggers
Jan 13 2008, 5:33 pm
By: fm47  

Jan 13 2008, 5:33 pm fm47 Post #1



Hey, I know there's a trigger replicator thing somewhere... how does it work? The database doesn't have files and maplantis is down... that's all I know of SC communities >_<

Basically, what I need is to copy all of player 1's triggers and paste it on player 2, then edit it recordingly. That is possible, right?

I tried using StarDraft... either I dont know how to work it, or it wouldn't let me copy and paste as I wished (never used SD prior to that). Same thing with StarForge.



None.

Jan 13 2008, 7:22 pm who Post #2



there probably is a program for that, which you can search on google, but what i do is a go to scmdraft, then copy and paste all of P1's triggers into a text editor.

then i just use find and replace (e.g. find and replace all instances of "Player 1" with "Player 2")

it's easier to do if you use death counts, because with switches you'll have to change every one so p1 and p2's triggers dont overlap.



None.

Jan 13 2008, 8:26 pm Fwop_ Post #3



You should only copy identical triggers for players only if you need to change the location. You could just use current player instead.



None.

Jan 13 2008, 10:27 pm fm47 Post #4



That's just about what I need it for, location. I have a location following each player and that location acts on just about everyting for player interaction with NPC.

That text editor thing doesn't sound too bad... not too familiar with trigger loading, but I'll give it a go, thanks.

EDIT::

So I'm trying to do this with scmdraft 2, the current version. I made a back up of my original map. With the new map, I deleted all the triggers till I have what I wanted to replicate. The trigeditor doesn't do anything to save, or save as... how do I work this?

EDIT AGAIN::

Ok, it worked, but I have to replace the locations. Is that necessary or did I forget to do something?

Post has been edited 2 time(s), last time on Jan 13 2008, 11:53 pm by fm47.



None.

Jan 14 2008, 12:48 am NudeRaider Post #5

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Use the compile button. Its the rightmost in the toolbar. Saving wont work.

When you use a follow location trigger and use current player you will only need to change the location name.




Jan 14 2008, 1:06 am blacklight28 Post #6



Well, this brings back my problem. I don't have the trigger editor that has text so that you can copy/paste. If I did, my newer maps triggers would be done so much faster...

But anyway, if you do have what I don't have just do what someone09 said. Probably the best way.



None.

Jan 14 2008, 2:47 am NudeRaider Post #7

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from blacklight28
Well, this brings back my problem. I don't have the trigger editor that has text so that you can copy/paste. If I did, my newer maps triggers would be done so much faster...

But anyway, if you do have what I don't have just do what someone09 said. Probably the best way.
You don't have ScmDraft 2? You really should. It has 2 trigger editors: One dialog based and one text based.




Jan 14 2008, 1:34 pm fm47 Post #8



Yeah, I realized Compile was the button... it doesn't have alt-text, I just thought it was debug, but I thought it was necessary to use it anyway.

Thanks for all the help guys, never used scmd2 beforehand. I'll just go change all the locations now~



None.

Jan 16 2008, 8:40 pm Twitch Post #9



Well I think you are needing text trigger duplicator by devilesk?If not then ignore me.



None.

Jan 16 2008, 9:50 pm Falkoner Post #10



Yes, he could use it, but where to get it with Maplantis down?



None.

Jan 17 2008, 4:50 am rockz Post #11

ᴄʜᴇᴇsᴇ ɪᴛ!

Here, there, everywhere!

So I don't know if this is all that dev made, but you'll need to be smart to get it to run.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 17 2008, 7:35 am JaBoK Post #12



An easy fix for the location problem (this removes all excuses for individualized trigs pretty much)
Move a standard location on a player every cycle, then do the rest of the current player triggers, then move it to player 2, rinse and repeat.
Cuts down a load of work, if you want an example I can upload an engine I did it on.



None.

Jan 17 2008, 1:47 pm fm47 Post #13



Quote from JaBoK
An easy fix for the location problem (this removes all excuses for individualized trigs pretty much) Move a standard location on a player every cycle, then do the rest of the current player triggers, then move it to player 2, rinse and repeat. Cuts down a load of work, if you want an example I can upload an engine I did it on.

hmm... I'm not sure what you mean, but currently I have an individual location for each player that followes them, next I have a "global" one jumps from one to the other, then repeat.

I was thinking, since the locations are only not found when the trigger is for current player, would it be better if I, say, set all the player 1 triggers for player 1, then use someone09's method and replace all the player 1's to player 2?

What I did earlier was save an extra copy of my map. Deleted all the triggers except for the ones I want to replicate. Saved, open trigger editor with scmd2, copy + paste into word processor. Find and replace all instances of player 1 to player 2. Compiled. Saved the triggers. Open original map, and loaded triggers. Then edited when necessary



None.

Jan 17 2008, 5:01 pm NudeRaider Post #14

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

For the global follow location you have to know trigger order:
First are ALL triggers of Player 1 checked, then ALL of P2, and so on.
That is valid despite the fact that you see another order in scmd if you mark the triggers of every player.
If there's a trigger owned by P2 above another of P1, P2's trigger is NOT executed before ALL of P1's triggers are done.

Now when you have a jumping location you have to execute all spells or w/e that take place at a player OWNED BY THAT SAME player.

For example...
P1's triggers:
1.) Center 'global' on [men] by Current Player (this is owned by every player)
2.) Spell: Heal yourself (P1): Set HP of all [men] of P1 @ 'global' to 100%

P2's triggers:
1.) Center 'global' on [men] by Current Player (this is owned by every player)
2.) Spell: Kill foes (P1): Kill all [men] by 'foes' @ 'global'

As you can easily see P2's kill spell will not take effect, as the location was already moved on P2. If you need something like that (cross player spell) you must set a dc or w/e and execute the spell for the target player the next trigger cycle.

If you keep that in mind you can easily replace you 6-8 locations following each player with one global location that jumps around the players.




Jan 17 2008, 6:53 pm Twitch Post #15



Quote from rockz
Here, there, everywhere!

So I don't know if this is all that dev made, but you'll need to be smart to get it to run.
If it doesn't say made by devilesk on it then,its not what I was talking about or its a stolen program LOL.



None.

Jan 17 2008, 11:42 pm rockz Post #16

ᴄʜᴇᴇsᴇ ɪᴛ!

Quote from Twitch
Quote from rockz
Here, there, everywhere! So I don't know if this is all that dev made, but you'll need to be smart to get it to run.
If it doesn't say made by devilesk on it then,its not what I was talking about or its a stolen program LOL.
I didn't remember whether he made more than just the one .exe. He made it, you just need some extra files for it to run (which you find on other sites).



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Jan 17 2008, 11:50 pm Twitch Post #17



You only need the Visual basic programs if they are not already installed.Most computers already have them installed via updates.



None.

Jan 18 2008, 11:42 am fm47 Post #18



With the global location, I had first used death counters. On the very top of player 1's triggers, I had it follow to player 1, add a death counter, which would then activate player 2, then so on until the last human player where it would reset it to zero.

That didn't work because I suppose if any human players are missing, the triggers do not fire off...

I then put all the 'move location' and 'add 1 to death counter' to player 8, and put wait 0's after the end of each one, so:

1-3 human players, player 8 computer player.

C: If Player 8 has suffered 0 deaths of Terran Starport
A: Center location labeled 'global_pl' on 'heroUnit' owned by Player 1 at 'Anywhere'.
A: Set death counters: Add 1 to Terran Starport for Player 8.
A: Wait 0 milliseconds.

repeat until player 3, where instead of adding another to terran starport, it would set it to 0.

I guess a better way is to place all those on each player and simply keep on using the computer death counter... but this method has worked so far (as much as I can test it alone).



None.

Jan 18 2008, 5:40 pm NudeRaider Post #19

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Lol... that won't work right. The wait(0) forces to sc to execute the next center location in the NEXT trigger loop. Here's an example what might happen when hyper triggers are running:

Trigger loop 1:
P1's triggers:
Spell: Heal yourself (P1): Set HP of all [men] of P1 @ 'global' to 100%
P8's triggers haven't fired yet, so the location is NOT CENTERED ON ANYTHING YET.


P2's triggers:
Spell: Kill foes (P1): Kill all [men] by 'foes' @ 'global'
P8's triggers haven't fired yet, so the location is NOT CENTERED ON ANYTHING YET.


P8's triggers:
Move Location on [men] by P1 (wait(0))


Trigger loop 2:
P1's triggers:
Spell: Heal yourself (P1): Set HP of all [men] of P1 @ 'global' to 100%
This one will work, as the location IS centered on P1 (coincidentially)


P2's triggers:
Spell: Kill foes (P1): Kill all [men] by 'foes' @ 'global'
The spell works, as the location is centered on P1 (coincidentially)


P8's triggers:
... continue after wait: Move Location on [men] by P2

Trigger loop 3:
P1's triggers:
Spell: Heal yourself (P1): Set HP of all [men] of P1 @ 'global' to 100%
This won't work, as the location IS centered on P2


P2's triggers:
Spell: Kill foes (P1): Kill all [men] by 'foes' @ 'global'
The spell won't work, as the location is centered on P2


P8's triggers:
Move Location on [men] by P1 (wait(0))

Trigger loop 4:
==> repeat from trigger loop 2

As you can see it works every 2nd trigger loop (and even less reliable with more players).

Why don't you just use the triggers I have suggested? (Center location trigger owned by human players, executing for current player). You won't find an easier solution for a jumping location.

Post has been edited 1 time(s), last time on Jan 18 2008, 5:48 pm by NudeRaider.




Jan 18 2008, 6:29 pm JaFF Post #20



1. Copy all P1 trigger code into Notepad
2. Use the "Replace" function: replace "Player 1" to "Player2", "P1" to "P2" (I hope you named your corresponding locations "locP1" and "locP2")
3. Paste the triggers into trigedit. Don't forget that all triggers must have one line between them, don't forget this while pasting. Paste P2 triggers directly after P1 triggers.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Roy, Dem0n