• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

SCV Football

Status
Not open for further replies.
Level 5
Joined
Jun 3, 2010
Messages
100
Hey guys,

I'm in need of some help. Even if I just get some general directions on each subject below, I'd be extremely grateful. As the title states, I'm attempting to bring back an old favorite of mine to SC2.

Each team consists of 3 users that control a total of 11 SCVs each, a fast paced micro war based on American Football. SCVs cannot pass the ball, only run it, and they will drop the ball if hit by an opposing SCV. If you carry the Football into the enemy endzone you score 7 points, and your SCVs within a certain range will be reset to your starting point.

The football field is created and all regions/starting locations set.

What I need help with:

Remove Fog of War for all players.

I've managed to get the SCV's to spawn; but I'm unable to get it to work at less than or = to 11 units.

Create a trigger that allows an SCV to pick up the Football and carry it, then drop it in place when it dies.

Creating a region based trigger for two endzones, that will count 7 points for the scoring team when the Football enters the region carried by the opposing team. i.e. Users should be able to enter their own endzone with the Football.

Creating a region based trigger for two endzones, that will destroy any SCV's that belong to the scoring user and his allies within a certain range of the scoring endzone.

Create a trigger to setup teams properly.

Create a winning condition that ends the game at 56 points. (8 Touchdowns)

I'd like to create Observer slots as well, I wish I was more skilled with triggers but hopefully someone will love this idea and help me out :)

Thanks again to anyone who can offer some insight or help :)
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Remove Fog of War for all players.
Use the site modifying natives / actions to do this. You may run the same piece of code for each player in a loop or just unroll the loop with separate lines of code for each player. This is pretty straight forward with any programming ability.

I've managed to get the SCV's to spawn; but I'm unable to get it to work at less than or = to 11 units.
Use conditions to test the number of units spawned. You can even have a counter in a loop (like a for integer in range loop) to spawn 11 units if you do not need them to spawn over time.

Create a trigger that allows an SCV to pick up the Football and carry it, then drop it in place when it dies.
This depends on how you want the football to behave (detailed in game mechanics). Consider checking if item objects can act somewhat like this and perhaps use triggers to support them.

Creating a region based trigger for two endzones, that will count 7 points for the scoring team when the Football enters the region carried by the opposing team. i.e. Users should be able to enter their own endzone with the Football.
Simple 2 triggers running when a unit enters region that if it has the football it adds +7 to one of the two score variables (integer variables) and then resets ready for the kickoff. I always thought goals scored 1 point in football but as this is a game I guess you can do whatever you want.

Create a trigger to setup teams properly.
Again, this depends too heavily on how you want it to behave in game. If you want random teams then you create 3 pools of players. One for the unsorted players, one for the one team and one for the other team. You simply choose a random player from the unsorted pool and add it to the one team and repeat for the other. If an odd number of players are present, consider making that one an observer to be fair.

Create a winning condition that ends the game at 56 points. (8 Touchdowns)
No idea what landing rockets have to do with football, but once 56 points (8 goals using your strange scoring system) are scored you can just end the game. You add the code to detect this on every action that adds score to a team.

Oh and before you bring your American patriotism into this...
a fast paced micro war based on Football
You need to be more clear what you are talking about. I am smart enough to know you mean Rugby (American Football) but, as my answers show, in the United Kingdom and the rest of Europe Football refers to Soccer. Soccer and Rugby are not the same sport thus you must make it clear that you mean SCV Rugby and not SCV Soccer (or what SCV Football means to most people).
 
Level 5
Joined
Jun 3, 2010
Messages
100
lol @ the Football ending, ya i thought of putting in American Football, but I don't really know what prevented me. Thanks for the input, I'll do my best now to read up on each subject and hopefully I'll get somewhere. :)

In soccer yes, the score would be one point per goal, but this is based on American Football, and a TD actually scores 6 points, and you get your 7th from a Field Goal, but I've eliminated the FG and added the opint to the TD :p

Ok, I've cleared the first two steps. Fog of War and Spawning are checked off the list.

Here is a detailed request for step 3.

The football will start off in the center of the Map and the teams will race for the center for initial posession. The first SCV that touches (without clicking) will pickup the Football, all remaining units should be used for defense of the ball carrier. You battle your way to the the opposing side and try to enter their Endzone with an SCV carrying the football. If your SCV dies, the ball will drop to the ground for any other SCV to pickup, the ball should be able to change instantly to the closest SCV within pickup range. When a goal is scored, the scoring team loses all SCVs that are within scoring range, and the ball Drops dead at the scoring location for the team to return.

I think this covers details of a few of my requests :)
 
Last edited:
Level 5
Joined
Jul 10, 2010
Messages
124
you should subscribe to OneTwoSCs youtube channel, he has a whole lot of trigger and data editor tutorials. they arent specific to your map but they will teach you how to think so you are more efficient with the editors
 
Level 5
Joined
Jun 3, 2010
Messages
100
Trying to create a Trigger that allies players 1-3 into a team, and players 4-6 into their own team.

I've gotten as far as trying to select the group to add them to, but I get lost at that point.

Add player X to (Player group).

What do I set the Player Group function value to?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
A variable, do keep in mind that a player group is just a collection of players. They can be useful to tell who owns what though. Like in your case you could test if a unit belongs to left team or right team by checking if the owner of the unit is in one of the team player groups.

Some actions allow you to do stuff directly to player groups and affect all who are contained within. Others only affect players and so require you to loop through the players in the group to do anything to them.
 
Status
Not open for further replies.
Top