View Full Version : I need some help with Triggers
Fenix-MSG
02-22-2004, 9:33 PM
Hey, im makin a map and i thikn i really need some help. I got bored with making the monsters map, which by the way i am almost done with, and so i started on a Advanced Wars map. Its played just like the gameboy game, the map is set up to look like a grid. There are also more than what there is in the second AW, possibly one or two of my own CO creations and the super CO powers for the COs that will be there. I hate system set up for everything but one thing. I need help making a triggering limiting where a unit can move. You may not understand if you have never played Advance Wars. Lets say a firebat stands for a mech, is there a way to limit his movement to two grid blocks.
Thx for the help. :ninja:
Terran-Civilian
02-24-2004, 5:02 PM
hey i think thats cool that you are making an advanced wars custom but sry i cant help ya with the triggers im a noob map maker
Nozomu
02-24-2004, 6:55 PM
It's certainly possible to make a grid-based movement system, but unfortunately it's quite impossible to explain without a sample map, and you would have to be a super-expert trigger master to understand how it would work, much less implement it yourself. I'd say you're going to have to figure it out by yourself, or you won't be able to use it effectively. In a few months I'll make a sample map, if only to challenge myself. In the meantime, try something simpler.
Adovid
02-26-2004, 11:48 AM
You can do a lot with the editor including keep up with the location of units on the map in the form of x y coordinates. If you wan'ted to incorperate traveling over mountains and roads that would be a little bit more complicated because you will have to check for those things and then do your calculations. Its all pretty much just geometry and algebra. You could also use the boolean for unit is in region and events for unit enters region with an object that counts how many regions you walk through in one turn.
No, it wouldn't take a super-expert trigger master.
Create a location that is 5x5, and call it...123
Conditions:
-Always. (whatever you want)
Actions:
-Move location 123 to firebat owned by player x at 'anywhere'
Trigger 2:
Conditions:
-Player x brings exactly 0 firebat to 123.
Actions
-Move all firebat for player x at 'anywhere' to 123.
Is this what you are looking for? If you want 2 grids away then the thing has to be 5x5, and not 4x4:
__________
|_|_|2|_|_|
|_|_|1|_|_|
|2|1|F|1|2|
|_|_|1|_|_|
|_|_|2|_|_|
Nozomu
02-28-2004, 7:56 PM
In the context of a turn-based Advance Wars style system with limited movement, you would have to be an absolute expert. Prove me wrong.
OK.
Now that we have added the turn-based context...
First of all, I have no idea how to play advance wars. I saw somebody else play it a long time ago. He was an expert and kept pressing buttons really fast without reading anything...
Conditions:
-Switch 'Player 2's turn' is set
Actions:
-Give all units owned by player 1 at 'game board' to player 8
-Preserve trigger.
This will prevent the player from moving units during his/her turn. You could have a beacon that says end turn that would set player 1's turn and clear player 2's turn. Then, use the trigger that I showed earlier to prevent units from moving too far.
For anything really complicated, you could put a god/referee player...but that's usually not a good idea.
If you want to allow a player to move only one unit, you could have a beacon where when you moved on it, it gave 1 and only 1 unit to the controlling player.
Nozomu
02-29-2004, 1:30 AM
Yeah, it's freakin' easy to give units to computers, we know that. Next time do some research into the game we're emulating. I would never include a referee slot. Who want to be a referee? Nobody. Why would you waste a switch for just a turn counter? What if there were 3 players? Use a Death Counter if you want efficiency and an extra usable string.
In Advance Wars, you only control one unit at a time. Each unit only has a specific number of squares that it can move. How Advance Wars works is that it has a shaded color on the squares to which you can move and shoot. Also, different types of terrain are harder to move across. In addition, units have a designated firing range. Some long-range units can't fire at units adjacent to them.
It would be incredibly difficult to limit unit movement in the Advance Wars style. You could also use a "movement points" system without the designated movement areas, but that would lead to long turns while people counted squares to see if they could move their units in range. The entire idea of Advance Wars for StarCraft is unrealistic. It would take forever to play the game, not just make it.
Well, for you first part, I thought AW was just a turn-based war game. I agree that it's unrealistic to make it in SC. It would be better to program it in some other language, but that would basically mean recreated Advance Wars, which would be useless.
I think it might be a good idea, though, to make your own version of Advance Wars. That might be cool, and it would take less time for people who haven't played AW to learn.
Nozomu
02-29-2004, 4:45 PM
Yeah, I was thinking about making a grid-based tactical system just to challenge myself. Maybe I'll do it and submit it to one of the monthly competitions. It's definitely possible, as long as it's kept simple.
Dark_Soul74
02-29-2004, 5:08 PM
How about this....
Conditions:
Current Player Brings At Least 1 (Unit) to (Location)
Current Player Brings At Most 0 (Unit) to 'Moved'
Current Player has at least X(Land type+) points
Actions:
Remove X points(Depending on land type)
Center location 'Moved' on (Unit) at (Location)
Preserve trigger.
Conditions:
Current Player has 0 points
Actions:
Give units owned by Current Player at 'Moved' to (Computer Holder, Non-Turn)
Move (Selector) to (Main area)
Preserve trigger
Conditions:
(Current Player's Computer Unit Holder, Current-Turn) Brings At Least 1 Unit to 'Selection'(Centered on a 'selector' unit constantly)
Actions:
Give all units owned by (Current Player's Computer Unit Holder, Current Turn) at 'Selection' to Current Player.
Give Current Player X points(depends on unit)
Move (Selector unit) to (Holding location, where it can't leave.)
Preserve Trigger.
Conditions:
Current Player Controls At Least 1 Unit at 'Moved'
Current Player has 0 points.
Actions:
Give all units owned by Current Player at 'Moved' to (Current Player's Computer Holder, Non-Turn)
Move (Selector unit) to (Main area location)
Preserve Trigger.
Conditions:
(Computer holder, current-turn) controls at most 0 units
Switch 'X Player Turn' is set
Actions:
Move (Selector) to (Holding Area)
Clear 'X Player Turn'
Set (Next player's turn switch)
Set switch 'Start'
Preserve triggers
Add in a turn system youself, and once it is a player's turn...
Actions:
Switch 'X Player's Turn' is Set
Switch 'Start' is Set.
Conditions:
Give all units owned by (Computer holder, non-turn) to (Computer Holder, Current-Turn)
Clear switch 'Start'.
Move (Selector unit) to (main area location)
Preserve Trigger.
I think that should be all.
?
I'm confused.
Could you keep all constants constants instead of switching between "Computer holding thing", computer non-turn holder," etc.?
Declare where the locations are before you do anything with them!
Dark_Soul74
02-29-2004, 5:57 PM
There....Fixed up my post a bit.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.