PDA

View Full Version : A few [newbie] questions


wakiki
05-27-2007, 11:45 PM
Hey guys! I've made several FFA melee maps for playing with friends, and now I've decided to venture into UMS. I have a few problems, though....

I am making a map based loosely off of Civilization. There will be tiles of grassland (jungle), forest (tree sprites), desert (dirt), and so on. I will be creating the map in Starforge.

When a player builds on these tiles, they will get resources every minute(or so). What resources they get will depend on both the tile and the building.

So, I need to create a bunch of locations, and have then start giving resources once you build on them, and I also need them to stop when the building dies.

Is there a way to do this: a) without switches, because I doubt I would have enough, and b) without having a map-wide "check" every minute like in diplomacy, because that would be really tedious. I could do that, but only as a last resort.

(By the way, I tested this twice, and I got it to work with a switch, but I couldn't without. It only gave the resource the first time I built on the square. I had 'preserve trigger' active too, so I may be missing something)

DoctorZettabyte
05-28-2007, 9:09 AM
Well, for even one location, the trigger set would be quite large. You'll need to have the condition of "Player 1 commands at least x # of buildings at location 0" and the action to be "Modify resources for player 1: add 100 minerals" and then the final action being "wait 60000" (or however many units add up to a minute or whatever you need.) Then wash, rinse, repeat for every map player and for every location. For even 8 small locations, you'll have at least 64 triggers, maybe more.

I'm pretty sure I got that right, you may want further input from some mapping masters though. Hope it helps and good luck!

-DocTera

wakiki
05-28-2007, 12:31 PM
Well, for even one location, the trigger set would be quite large. You'll need to have the condition of "Player 1 commands at least x # of buildings at location 0" and the action to be "Modify resources for player 1: add 100 minerals" and then the final action being "wait 60000" (or however many units add up to a minute or whatever you need.) Then wash, rinse, repeat for every map player and for every location. For even 8 small locations, you'll have at least 64 triggers, maybe more.

I'm pretty sure I got that right, you may want further input from some mapping masters though. Hope it helps and good luck!

-DocTera

That's kinda what I did. Here's the trigger:

Players:
All Players

Conditions:
Current Player brings at least 1 buildings to 'Grassland'

Actions:
Modify resources for Current Player: Add 1 Ore
Wait for 300000 milliseconds
Preserve Trigger

This worked for starting the resource collecting, but it didn't stop when the building died.

You mentioning the Command trigger gives me an idea though. Would a better way to do it be to use "Command the most at" trigger, and say commands the most buildings at 'location'?

TitanWing
05-28-2007, 1:02 PM
You may need to make another trigger with a switch...I'm not sure if there's a way to do this without switches.

DoctorZettabyte
05-28-2007, 9:03 PM
Cmds the most @ should be less buggy, because what if the size of the loc is big enough for a turret, photon cannon, and a supply depot? Then both players would get ore and boom, there's a bug.
Switches would also prevent bugs, for instance, a building dies. (A very common event) that player still gets ore, right?
You may also have to use hyper-triggers to preserve it, but I'm no good at map theory, or anything beyond StarEdit.

-DocTera

SlicedBread
05-28-2007, 9:08 PM
all i can say is that you have got a hell of a lot of work ahead of you to make this map a success and i wish you good luck. be sure to let me know when you are finished with this map because i am a huge fan of the Civilization series and would love to see your starcraft interpretation of it.

snowolves
05-28-2007, 10:20 PM
Conditions:
Current Player brings at least 1 buildings to 'Grassland'

Actions:
Modify resources for Current Player: Add 1 Ore
Wait for 300000 milliseconds
Preserve Trigger

It should stop when the building die.

wakiki
05-28-2007, 10:50 PM
It should stop when the building die.

Well, that's what I think I did, and it didn't work, but I'll test it again just to make sure.

By the way guys, I was doing my tests in Staredit. I just moved to Starforge to start using the square terrain (pretty nifty stuff, heh).

However, I can't seem to get triggers to work. They appparently don't put the information in for you. I tried wording it exactly like snowolve's example, saved the trigger, went back to look at it; nothing. I opened Staredit to look at how the triggers were worded, typed them in exactly (every capital letter and period in place); didn't work. :\ What am I supposed to do? Heh.

See, I only asked one question in the original post. But I knew that I'd have more, so I made it plural in advance. Good thinkin' eh? :)

(or it could be that I just forgot my second question as I was typing my first....nah....couldn't be)
;)

snowolves
05-29-2007, 5:07 AM
My example?It was quoted from you.
I suggest make all triggers with Staredit or X-tra Editor,then open the map with StarForge if you don't lose the triggers by doing this.
To test,you can:make a map with Staredit,create that trigger(and the location as well),place an SCV for player and give him enough resource.Then try the map.

Egon
05-29-2007, 8:07 AM
Never use SF for anything other then unit placement and blocking land *shivers*

Anyway, the only thing that I could find that could be making the trigger screw up is that you have it sent to buildings and not the exact building, such as Supply Dept. Other then that I don't see anything that could go wrong.


Players:
All Players

Conditions:
Current Player brings at least 1 buildings to 'Grassland'

Actions:
Modify resources for Current Player: Add 1 Mineral
Wait for 300000 milliseconds
Preserve Trigger


Just so you know, this would only add one mineral every minute even if you had 87 buildings.

Redhead267
05-29-2007, 1:08 PM
The problem with the "bring" trigger is that it it will still stay in affect, even though the unit isn't currently at the location, just as long as its been to the location before. So I don't know how to help you here, you may need to ask a pro at triggering.

Egon
05-29-2007, 1:55 PM
I'd use the command at least other then bring.

Dark_hunter4
05-30-2007, 7:40 AM
I have found that command (least/most) @ to be very effective for those type of things, bring more so works with remove after the desired effect.