PDA

View Full Version : Need Idea for trigger-system


Anarcy
03-24-2007, 3:43 AM
Hi there,
right now, im working on a new BW-UMS-map.

I need help for this system:
You can hijack vehicles (like a vulture). If this vehicle is destroyed, your main unit (like a marine) should appear again.
My problem is now: I want to make a system, in which you have 3 lives, and you lose 1 life if your MAIN unit is killed, not the vehicle.

Thanks for help

(If you wanna know what I exactly mean hijack mean:
If you stand near a NPC-Vulture, you can hijack it via moving a unit on a beacon. Your main unit will be stored in a non-accessable area. You get the NPC-vulture and the NPC gets your main unit in the storage area. If you move again on the beacon, you will exit the vehicle by giving the Vulture back to the npc and the main unit back to you, which is of course teleported back to the car.)

Basan
03-24-2007, 6:13 AM
Easy. :) Set a trigger to count your marine's deaths. Three and he's out (and queues the fail mission trigger). There are other methods such as involving switches but why complicate? :P

Anarcy
03-24-2007, 7:08 AM
Oh, I forgot to say, that the marine is not the only unit you can get.
You can get like 15 units, and making a trigger for every unit everytime is kinda long work.

Basan
03-24-2007, 7:11 AM
Oh, I forgot to say, that the marine is not the only unit you can get.

So? I don't see any problem with that from the way you described it. :)

You can get like 15 units, and making a trigger for every unit everytime is kinda long work.

No pain, no gain. :P

SilverCrusader
03-24-2007, 7:22 AM
There are other methods such as involving switches but why complicate?
Because I'm in love with switches? :P

You can hijack vehicles (like a vulture). If this vehicle is destroyed, your main unit (like a marine) should appear again.
Some of the higher-level triggering, you can have locations that always stay on the unit for each vehicle that you can hijack, than you just give units and move the <insert unit here> to a location where the player can force the unit to exit the vehicle via beacon, or forcefully move them out if the unit explodes (make sure that a switch sets on whether you can enter the vehicle or not, or else they will be stuck in the vehicle forever!).

My problem is now: I want to make a system, in which you have 3 lives, and you lose 1 life if your MAIN unit is killed, not the vehicle.
I suggest just having units that represent lives (khalis crystal, mineral chunk, stuff like that). And have 3 of them in a nonaccessable area.

NpnArbiter
03-24-2007, 9:19 AM
The only thing I can add to SilverCrusader and Basan (which seem to be gosu at mapping)

You can make all of his live switches, saving space and an ugly crystal :P
If there are multiple marines there is a problem... :confused: ..... I think you can just take away a marine for every three deaths (Sadly you can't center a location on them since they are the same unit)
There might be a problem if you want multiple vultures too, again no center location. Maybe just a few diffrent spawn/load/unload beacons? And a few load/unload beacons around the map? (If you disable all of the beacon's doodad states they might look a bit cleaner) If you gave a few details about the map actualy it would be easier (If one marine is a hero, If the other units aren't marines.)

I wish you could make a mod and just have 14 marine clones that you could be placed on the map.

SilverCrusader
03-24-2007, 10:02 AM
it can be done with switches... but I prefer to stick to simpler means of doing things. Web Triggers of the scale your talking about tend to glitch up.

I'm more than positive you could do it... but lets stick to the easy stuff.. leave the advanced stuff be unless there's no other choice.
There are other methods such as involving switches but why complicate? :P
^ Take our advice.

Basan
03-25-2007, 5:23 PM
Because I'm in love with switches? :P
...
I suggest just having units that represent lives (khalis crystal, mineral chunk, stuff like that). And have 3 of them in a nonaccessable area.

That, we already know. :P But I was only referring to the death counter. Or, for that matter, a custom one that could easily reflect the loss of lives (through a subtracting trigger).

Some of the higher-level triggering, you can have locations that always stay on the unit for each vehicle that you can hijack, than you just give units and move the <insert unit here> to a location where the player can force the unit to exit the vehicle via beacon, or forcefully move them out if the unit explodes (make sure that a switch sets on whether you can enter the vehicle or not, or else they will be stuck in the vehicle forever!).

I didn't mention the vehicle triggering because the way it was spoken it seemed that he/she already got it covered. :)

The only thing I can add to SilverCrusader and Basan (which seem to be gosu at mapping)

Not gosu, just well around it. :D

You can make all of his live switches, saving space and an ugly crystal
If there are multiple marines there is a problem... ..... I think you can just take away a marine for every three deaths (Sadly you can't center a location on them since they are the same unit)
There might be a problem if you want multiple vultures too, again no center location. Maybe just a few diffrent spawn/load/unload beacons? And a few load/unload beacons around the map? (If you disable all of the beacon's doodad states they might look a bit cleaner) If you gave a few details about the map actualy it would be easier (If one marine is a hero, If the other units aren't marines.)

*Over complication meter explodes*
He can set a counter to keep spawning a Marine until he reaches zero. After that if he dies, set two conditions (the counter being zero and the suffered death one) in the trigger to lose the game.

And you can centre different location over different 'Rines (even of the same player) but those would have to be really small and already above'em when the map starts. Although for the case being I sure don't suggest this method.

The map in question is almost assuredly GTA (http://en.wikipedia.org/wiki/Grand_Theft_Auto_(series)) based. ;)

SilverCrusader
03-25-2007, 5:41 PM
The map in question is almost assuredly GTA based.
now that you mention it...

The only thing I can add to SilverCrusader and Basan (which seem to be gosu at mapping)

Not gosu, just well around it.
Nah, I'm not gosu at mapping, I sux at terrain xD.

I didn't mention the vehicle triggering because the way it was spoken it seemed that he/she already got it covered.
True, but he said move onto a beacon, which SC players are lazy bums..

Anarcy
03-28-2007, 2:02 PM
Okokok... thanks for answers.
You are right, Basan, it is GTA based... well, it is a GTA map. Cause I saw some GTA maps which were really crappy, I wanted to make a better one.

But back to the problem:
I know what you mean, with Crystals, lives, swichtes and so on.
Due to the fact, that you can have more weapons (means more units [10-20]) it is impossible for me to make a trigger for every unit for every life for every player. I cant just make a trigger "if player xy must suffer a loss of 1 Unit, than remove 1 Crystal..." because with the cars, which do NOT count as death if they are killed, would cause a lifeloss...
...

I will make a version just with the hijack system, to show you. Then you can see.

Anarcy
03-28-2007, 2:12 PM
Ok, here the map.

(sry for doublepost)

Basan
03-28-2007, 2:14 PM
I think that you're not seeing the picture that have initially stated. You'd have a counter for Marine kills and other trigger just to teleport the Marine to the vehicle when it died. As simple as that (or almost). ;)

And btw, no map was uploaded Anarcy. And the edit post button is your friend. Use it wisely. :)

SilverCrusader
03-28-2007, 2:23 PM
I think that you're not seeing the picture that have initially stated. You'd have a counter for Marine kills and other trigger just to teleport the Marine to the vehicle when it died. As simple as that (or almost).

Yeah.. umm simple...

Your going to have to pull off a trigger that fixes a location on every vehicle in the entire game. So you have somewhere to teleport back to.
[Or you could pull a realism and have you respawn at a hospitil (meh, i can't spell..)]

Basan
03-28-2007, 3:17 PM
Nah, that would be easy. Since he won't possess more than one vehicle at a time he can give it to the human player and then the location could stalk it. After the vehicle dies the teleport the Marine one would kick in. As for the Marine death one respawning in nearest Hospital that would also be easy, if ya ask me. Have a location to cover the supposed area that each hospital covers and as soon as the Marine or it's vehicles enter it, activate a switch (and deactivate all other hospital related ones). If the Marine dies in that area and the switch is on then it would spawn inside it. Actually, I think it's far easier doin' that explaining. :)

Important note: I also advise ya to not have hospital coverage area locations overlapping one another because that might obviously turn things a bit messy (if the 'Rine dies in that overlapped section).

SilverCrusader
03-28-2007, 4:50 PM
Yeah, I like the hospital idea. It adds simplicity, but also realism. And you can strip them of all their money from doctors fee, wouldn't that just be great?

Basan
03-28-2007, 5:04 PM
Actually, I've never played a GTA map for SC-BW before but if I did one, that's how I'd have done it. ^_^

SilverCrusader
03-28-2007, 5:20 PM
Great minds think alike.
I've played the GTA map, it was pretty bad.
Mapping seems to have gone down the drain... people like making noob maps..

Well, just follow our advice Anarcy, and you'll be good to go. *does taco bell thing-a-ma-jig*

MidnightGladius
03-28-2007, 5:57 PM
I think Anarcy's point was that he was using multiple unit types for hijackers, not just rines.

Admittedly, this isn't much harder, but you two seemed to be ignoring it :)

So, we have a hijacker, and a vehicle, and a location where the hijacker is taken to when he is in a vehicle, right?

So we have two triggers dealing with deaths:

C: Current player suffers at least 1 death of men.
C: Current player brings at least 1 men to Storage Location.
<This means that your vehicle, not the hijacker, is dead>
A: Whatever you want

Thus, the other trigger would be:

C: Current player has suffered at least 1 death of men.
C: Current player brings at most 0 units to Holding Area
<The hijacker, in this case, has died>
A: Whatever you want.

Clearer?

Basan
03-28-2007, 6:14 PM
Oh, like a mission in which he died if he didn't returned a specific vehicle to a particular spot? Me likes the idea. ^_^

SilverCrusader
03-28-2007, 6:53 PM
yeah.. but the returning part is hard.. you have to have a location to return to, you can't have him pop up out of nowhere.

MidnightGladius
03-28-2007, 7:03 PM
Easily. If you have a man, center the location on the man. If you're in a vehicle, then check for 0 men in the playing area (i.e. not including the technical stuff for the holding area, etc.) and center the location instead on the vehicle.

Then, when you control neither a vehicle nor a man on the playing area, bring back the man to the location you had centered on the vehicle. Piece of cake.

SilverCrusader
03-28-2007, 7:52 PM
and how'd u get it to center on vehicle?
The only way u can really do this is with switches.

Basan
03-28-2007, 8:06 PM
and how'd u get it to center on vehicle?
The only way u can really do this is with switches.

No, but provided that the 'Rine has to have lives perhaps switches are better. Although using the deaths or custom counter (for the Marine) can also pull it, I believe. ;)

MidnightGladius
03-29-2007, 8:49 AM
I'd prefer death counters, but yes, switches would work, too.

Anarcy
03-29-2007, 8:52 AM
Thanks MidnightGladius, i havenīt thought about that kind of trigger... I will test it right away.

Ehm, i got this with cars and without swichtes.

If you like, I can post the map here.

Basan
03-29-2007, 11:37 AM
Post away. We sure would like to see it. :)
Being bold enough to speak for the others, of course. :smirk:

SilverCrusader
03-29-2007, 8:00 PM
Well actually, no, you can't do it with deathcounters, because I was talking about attaching a location onto a vehicle only when the player moves next to it.

MidnightGladius
03-29-2007, 8:38 PM
The only thing that is doable only with switches is randomization, and since that's not at work here, I'm not quite sure what it is you're trying to say :)

You see, since you'll either have (from his description) one infantry unit or one vehicle unit on the playing field at the time, you can use the same location, once you've used a condition to ascertain which unit it is you're currently controlling.

SilverCrusader
03-29-2007, 8:43 PM
yes, but you have to keep the location from moving back onto the man when he goes in the waiting area, which you have to use switches to prevent, so the conditions aren't met, and the location will stay where it is, and focus on the vehicle, not the man, you can try and move the man and say, if it has 0 men than do this, but there will never be 0 men in the location, cause the location will follow the man.

MidnightGladius
03-29-2007, 8:46 PM
You're misunderstanding me, it seems. The location would never go into the waiting area because it would only follow the infantry IF there were nothing in the waiting area. So, if you use hypertriggers, the moment you activated the hijack, the location would stop moving. Granted, the trigger would have to be made like this:

C: CP brings at most 0 men to Waiting
C: CP is still in the game (compute that however you will; I'd use death counters)
A: Center location A on <whatever infantry> at Playing Area
A: Wait 1 millesecond.
A: Preserve Trigger

- to make sure that it wouldn't accidentally get stuck in between the trigger loops.

SilverCrusader
03-29-2007, 8:54 PM
ahhh i see, my bad. I'm stuck to my good ol' style of triggering, which happens to be very complex, and i often shoot right past the simple stuff.

MidnightGladius
03-29-2007, 8:58 PM
Hmm, I'm curious. How exactly would you do it (generally speaking)?

SilverCrusader
03-30-2007, 7:31 PM
Lemme just show you:

Trigger("Player 1"){
Conditions:
Always();
Switch("Switch1", not set);

Actions:
Move Location("Player 1", "Men", "Anywhere", "Location 0");
Preserve Trigger();
Wait(0);
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Bring("Player 7", "Terran Vulture", "Location 0", At least, 1);
Switch("Switch1", not set);

Actions:
Set Switch("Switch1", set);
Set Switch("Switch2", set);
Give Units to Player("Player 7", "Player 1", "Terran Vulture", 1, "Location 0");
Set Switch("Switch1", clear);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Switch("Switch2", set);

Actions:
Move Unit("Player 1", "Men", 1, "Location 0", "Location 1");
Give Units to Player("Player 1", "Player 7", "Men", 1, "Location 1");
Set Switch("Switch2", clear);
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 1"){
Conditions:
Deaths("Player 1", "Terran Vulture", At least, 1);

Actions:
Set Deaths("Player 1", "Terran Vulture", Set To, 1);
Move Unit("Player 7", "Men", 1, "Location 1", "Location 0");
Give Units to Player("Player 7", "Player 1", "Men", 1, "Location 0");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Yes, I'm that crazy.

MidnightGladius
03-30-2007, 8:29 PM
It works, certainly, but why go to the extra effort?

SilverCrusader
03-31-2007, 6:46 AM
I'm in love with switches.

I just like using switches because they have such a big potential. And I'm still experimenting on my web trigger theory.

Anarcy
04-02-2007, 5:13 AM
web trigger theory?
Whats that?

SilverCrusader
04-03-2007, 6:40 PM
I think this answers your question.. It might be a bit advanced.
http://www.warboards.org/showthread.php?t=25471

Anarcy
04-04-2007, 5:04 AM
Mhhhh...
I always try to avoid switches. I just use them where it is really necessary.
But for the GTA map im using many switches. Impossible without them.

SilverCrusader
04-04-2007, 8:06 PM
Their a good frontier in mapping, and I like to exploit them.