[RA] Start without MCV? (only prebuilt barracks)
I'm working on a map with only infantry
[RA] Start without MCV? (only prebuilt barracks)
Hey
I'm working on a map with only infantry, and since it's a small map I don't want a clumsy MCV since there's no need for it anyway.
Is it possible to make a map with no MCV? and only access to the prebuilt barracks.
And then give some power so the players don't have low power, but without the power buildings.
Thanks in advance
I'm working on a map with only infantry, and since it's a small map I don't want a clumsy MCV since there's no need for it anyway.
Is it possible to make a map with no MCV? and only access to the prebuilt barracks.
And then give some power so the players don't have low power, but without the power buildings.
Thanks in advance
- MustaphaTR
- Posts: 203
- Joined: Mon Aug 04, 2014 6:38 am
- Location: Kastamonu, Turkey
You can edit rules in a map, changing the starting settings and power usage of barracks would be enough. I'm not sure if a building can be a starting unit, if not you can make MCV deploy to a barracks.
If you don't know how to add map specific code you can check some modmaps on resource site. For example this: http://resource.openra.net/maps/19284/
If you don't know how to add map specific code you can check some modmaps on resource site. For example this: http://resource.openra.net/maps/19284/
I assume you know how to edit an oramap,and how to create a rules file in side the map.
so use this code in your rules.yaml file in side your map.
Be aware that you need to use the "TAB" key for spacing the words and not the spacebar.
example:
TENT:
"TAB"Power:
"TAB""TAB"Amount: 200
(i hope that this example makes sense)
If you have any more questions or you don't know how to edit your map,just ask here.
so use this code in your rules.yaml file in side your map.
Code: Select all
World:
MPStartUnits@mcvonlysov:
Class: none
ClassName: Construction Yard
Factions: soviet, russia, ukraine
BaseActor: barr
MPStartUnits@mcvonlyally:
Class: none
ClassName: Construction Yard
Factions: allies, england, france, germany
BaseActor: tent
-MPStartUnits@mcvonly:
-MPStartUnits@lightallies:
-MPStartUnits@lightsoviet:
-MPStartUnits@heavyallies:
-MPStartUnits@heavysoviet:
BARR:
Power:
Amount: 200
TENT:
Power:
Amount: 200
example:
TENT:
"TAB"Power:
"TAB""TAB"Amount: 200
(i hope that this example makes sense)
If you have any more questions or you don't know how to edit your map,just ask here.
I think playing around with this should do it.
Code: Select all
Player:
PlayerResources:
DefaultCash: 500
Blackened: Thanks!
This worked:
This worked:
Code: Select all
Player:
PlayerResources:
SelectableCash: 500
DefaultCash: 500
I need some help with Lua scripting
I want to know which team ID's are in the game, like Team 1 and Team 2 - or team 4 and team 3.
I have tried with this:
But this returns 5 "players": me, neutral, creeps, bot and "everyone".
How can I filter actual players from via GetPlayers()?
My goal is to check if there's exactly 2 teams, and then at every 500 tick I'll message the points for each team.
I've made the triggers and it works, it just shows the wrong teams..
Does this make any sense?
I want to know which team ID's are in the game, like Team 1 and Team 2 - or team 4 and team 3.
I have tried with this:
Code: Select all
players = Player.GetPlayers(nil)
for key, player in pairs(players) do
Media.DisplayMessage("Found a player! " .. player.Name)
end
How can I filter actual players from via GetPlayers()?
My goal is to check if there's exactly 2 teams, and then at every 500 tick I'll message the points for each team.
I've made the triggers and it works, it just shows the wrong teams..
Does this make any sense?
Okay I figured it out:
Code: Select all
players = Player.GetPlayers(nil)
for key, player in pairs(players) do
if not player.IsNonCombatant then
Media.DisplayMessage("Found a player! " .. player.Name)
end
end
Sorry for spamming but need help again
How do I kill/destroy all players in a team?
I tried this:
but I got an error:
Is there a more simpler way to do it?
How do I kill/destroy all players in a team?
I tried this:
Code: Select all
function kill_team(team_id)
-- Get all players in the team.
for key, player in pairs(players) do
if not player.IsNonCombatant and player.Team == team_id then
-- Kill all actors owned by the player.
local actors = player.GetActors()
for key, actor in pairs(actors) do
actor.kill()
end
end
end
end
Code: Select all
Actor 'player' does not define a property 'kill'
- MustaphaTR
- Posts: 203
- Joined: Mon Aug 04, 2014 6:38 am
- Location: Kastamonu, Turkey
Doing that makes you try to kill the actual "Player:" actor too, you should try to filter it out somehow, i'm not sure how exactly tho.
https://github.com/OpenRA/OpenRA/issues/13006
https://github.com/OpenRA/OpenRA/issues/13006
You should give them own objectives and mark them as failed (look at the missions on how to do that, or ask [me] again for a more detailed explanation).
If you want to destroy all units of a player, you can use something like
Code: Select all
local actors = Utils.Where(Map.ActorsInWorld, function(actor)
return actor.Owner == player and not actor.IsDead
end)
Utils.Do(actors, function(unit)
unit.Kill()
end)
Thanks! I made it work with MarkFailedObjective for the failing team and MarkCompletedObjective for the winnig team.abcdefg30 wrote: ↑ You should give them own objectives and mark them as failed (look at the missions on how to do that, or ask [me] again for a more detailed explanation).