Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED] Help my triggers are being *****es
Report, edit, etc...Posted by Candle12345 on 2006-12-28 at 06:04:32
now this is probably a noob problem, but if someone can help me find an easier way than multiplying the total amount of triggers in my map by 4 i'll be deeply thankful, heres the problem:

I've got this Desert map thing y'see and you've got to capture cities (like risk apparently, but i've never played it so i cant really say it is) anyhoo you capture cities with your troops and stuff, and that all works fine, so when you command a city(here comes the problem) you get bonusses every "payday" now the bonusses are: 500 minerals per city centre & a hero at each city. all fine an dandy, in SP it all works beautifully, but as soon as i have more than 1 player the triggers just stop, no heroes,no cash bonus... heres a copy of each triggers layout:

500 mineral bonus:

Players affected: P1,P2,P3,P4

Conditions: Current Player controls exactly 1 City Centre (1 for each town), Timer is at exactly 1 (because on 0 it resets, so i figured, why not jut put it on 1? nobody will notice)

Actions: Modify Resources for current player, add 500 Minerals, Preserve Trigger

and now the heroes trigger:

Players Affected: P1,P2,P3,P4

Conditions: Countdown timer is exactly 1 seconds, player commands most units at "Generic City Location"

Actions: Create 1 "Hero unit" at "Generic City Location


Please help sad.gif my friends say the map is awesome, i really want to finish it. look in the current SEN competition for my (would-be) entry its the same map, just without the hero triggers yet, i think
Report, edit, etc...Posted by xmrxsiegecopx on 2006-12-28 at 06:20:05
Change "current player command most unit at 'Generic City Location'" to "current player brings exactly 1 'Hero Unit' to 'Generic City Location'."
Report, edit, etc...Posted by Candle12345 on 2006-12-28 at 06:27:02
umm, it spawns heroes, there are no heroes to start with... so that wouldnt really do anything, in fact probably make it worse... and then it would activate for anyone who brought a hero into the city...
Report, edit, etc...Posted by xmrxsiegecopx on 2006-12-28 at 06:52:18
My bad; I mixed up the triggers for a bit.

Since you say the money and hero trigger problems occurs when there are multiple players on the map, the problem could be that the other players are setting the countdown timer before the hero and cash triggers take effect.

Simply use a death counter timer (or wait timer if possible) that matches the countdown timer, and use the conditions for the money and hero triggers for the death counter (wait) timer instead of the countdown timer condition.
Report, edit, etc...Posted by Candle12345 on 2006-12-28 at 21:09:16
Thanx, that makes much more sense
biggrin.gif
Report, edit, etc...Posted by Zeratul_101 on 2006-12-28 at 21:32:44
just a general mapmaking note, multiplayer gameplay is different than singleplayer(the menu where you play campaigns) gameplay. triggers and such react differently depending on the mode. what works perfectly on one mode will be seriously freaked up in the other.

so, don't test multiplayer maps in single player.
Report, edit, etc...Posted by Candle12345 on 2006-12-28 at 22:49:41
thanks, i wonder why that is...
and its freakin hard to find good playtesters...
Report, edit, etc...Posted by Lord-Omega on 2006-12-29 at 14:39:20
Id try and not make it so only 1 trigger affecting 4 players, Im always getting trouple with a trigger that affects more than 1 player. That might work, i think it will, but you never realy know.
Report, edit, etc...Posted by T-a-r-g-e-t on 2006-12-30 at 07:40:10
sorry to say this, but what a terrible trigger structure. its totally unreliable. especially if you add hyper triggers, which i strongly recommend.

okay, this is your problem;

QUOTE
Timer is at exactly 1 (because on 0 it resets, so i figured, why not jut put it on 1? nobody will notice)


considering the triggers cycle once every 2 seconds, and your condition demands 1 second, the condition will not ALWAYS run. if it happens to cycle the moment the timer gets down to 1, it will work. if not, then it won't work.

the other problem with that, is even if you did have hyper triggers, the trigger will run more than once. about 12 times a second, because for the entire second only, the condition is valid. Understand?

my solution to you is simple. start using death counters. they are so much more reliable and constructive. its best to assign a player to count a number of death counters. for instance, lets rename a uraj crystal, Counter-----Timeout. these are your triggers;

TRIGGER 1

players;
assigned counting player (preferably computer player)
conditions;
if countdown timer is at most 0
actions;
set deaths for players 1,2,3,4 to 1 Counter-----Timeout
set countdown timer to 60 (or whatever)
preserve trigger

TRIGGER 2

players;
1,2,3,4
conditions;
current player controls exactly 1 city
if current player has suffered at least 1 death of Counter-----Timeout
actions;
give resources etc
give heroes etc
set deaths for current player to 0 Counter-----Timeout
preserve trigger
Report, edit, etc...Posted by Candle12345 on 2006-12-30 at 19:13:50
Wow, thanx target w00t.gif , i can see how this works, i'll use that, although... whats hypertriggers? confused.gif
(yer talking to a Staredit only user, i very rarely use anything but it, its such a nice interface...)
Report, edit, etc...Posted by T-a-r-g-e-t on 2006-12-30 at 19:37:46
yep no problem. im always happy to help.

okay, allow me to introduce you to hyper triggers. without hyper triggers, starcraft cycles the triggers once every 2 seconds. with hyper triggers, it cycles the triggers 12 times a second. much faster!

the idea is, you use hyper triggers to make your map more responsive. All bound maps use them, because they require a location to constantly follow a specified unit. so, if you have hyper triggers, the location will follow the unit 12 times a second. however, i think all maps need hyper triggers. once you begin using them, you'll never go back! i strongly recommend them.

download this map first of all, so you can see what i'm talking about;

http://www.staredit.net/index.php?download=5026

NOTE: don't ask me how they work lol!
Report, edit, etc...Posted by Puddin on 2006-12-31 at 00:33:52
QUOTE(Candle12345 @ Dec 28 2006, 08:49 PM)
its freakin hard to find good playtesters...
[right][snapback]606949[/snapback][/right]

yawn.gif!!! I'm a good play tester!! >< I'm Anon]BoH =D
And by the way, a hyper trigger is something that just has a whole bunch of waits and a preserve trigger. Like this:
Condition:
Always
Actions:
Wait 0 miliseconds (x62)
Preserve Trigger
Comment: Wait Trigger (Or whatever you want it to be)
You can do this on normal StarEdit, you don't need a special editor.

And death counters need a lot of triggers. I'd use "Timer is at most 2 seconds" Then the actions. And Target, your "At most 0 seconds" thing would ALSO demand 1 second. Because then the timer would reset itself end then it wouldn't be "At most 0 seconds".
Report, edit, etc...Posted by T-a-r-g-e-t on 2006-12-31 at 01:21:20
wrong my friend. death counters actually save you alot of time, and in some situations you NEED them. i use (if at most 0 deaths) all the time, and my triggers always work. you see, it doesnt run for the entire second, because as soon as the trigger runs once, the actions (set deaths from 0 to whatever) affect the conditions of the trigger. therefore it won't run again. oh and id appreciate it if you didn't use my advice as a bad example when you obviously don't know what you're talking about.

if you want to see my skill and knowledge of map making, play my new map, Headquarters;

[attachmentid=22246]
Report, edit, etc...Posted by Puddin on 2007-01-01 at 03:24:42
QUOTE(T-a-r-g-e-t @ Dec 30 2006, 11:21 PM)
oh and id appreciate it if you didn't use my advice as a bad example when you obviously don't know what you're talking about.

if you want to see my skill and knowledge of map making, play my new map, Headquarters;

[attachmentid=22246]
[right][snapback]607855[/snapback][/right]

I wasn't trying to use your advice as a "bad example", actually I said nothing to make it a bad example. I said "Death counters need a lot of triggers", that saying I'm too lazy to use death counters.

ADDITION:
Well Candle had me work on his map, and I changed some things with the triggers and the heros are spawning just fine now. They weren't spawning because the triggers were set for players 1, 2, 3, and 4. We put the triggers seperately and now they're just fine. So we didn't need death counters, but I do now realize how death counters can be useful. wink.gif
Report, edit, etc...Posted by fritfrat(U) on 2007-01-01 at 09:35:20
Most maps are better off with hyper triggers, and death counters are needed to avoid wait blocks. But, if you can still use hypers and not have wait blocks due to only running 1 wait at a time or using the countdown timer, all the power to you smile.gif

--Solved. If Puddin was wrong in that it wasn't, sorry & unlock it, but this topic has potential for spam.
Next Page (1)