Make civ 1 and 2 roam randomly?
How can I do this?
Make civ 1 and 2 roam randomly?
I am making a minigame map where I need the ability to allow civ 1 and civ 2 to roam randomly and sometimes stay in one spot... I also need to give a penalty to a player if they kill the neutral buildings/ civ's. How would I go about doing this?
Have a look at https://github.com/OpenRA/OpenRA/blob/b ... .yaml#L375 the visceroid uses AttackWander to move around. You can disarm him by using adding JustMove to the Attackmove https://github.com/OpenRA/OpenRA/blob/b ... .yaml#L133 see the engineer for example. To give penalties I suggest to use negative bounties (killing them costs money). The bounty is calculated from the unit build cost so try making a negative value and maybe also add -GainsExperience: so that you don't get promoted for shooting civilians.
Hey thanks for the help! I got everything working except for the negative bounty...Cmd. Matt wrote: ↑Have a look at https://github.com/OpenRA/OpenRA/blob/b ... .yaml#L375 the visceroid uses AttackWander to move around. You can disarm him by using adding JustMove to the Attackmove https://github.com/OpenRA/OpenRA/blob/b ... .yaml#L133 see the engineer for example. To give penalties I suggest to use negative bounties (killing them costs money). The bounty is calculated from the unit build cost so try making a negative value and maybe also add -GainsExperience: so that you don't get promoted for shooting civilians.
for the civ I have the following code... what is wrong with it? I assume I am placing the bounty in the wrong place though...
Code: Select all
C1:
Inherits: ^Infantry
Selectable:
Voice: CivilianMaleVoice
Bounds: 12,17,0,-9
Valued:
Cost: 70
Tooltip:
Name: Civilian
Health:
HP: 20
AttackWander:
JustMove: True
-GainsExperience:
-GivesExperience:
GivesBounty: -50
Mobile:
Speed: 4
RevealsShroud:
Range: 2
AttackFrontal:
PrimaryWeapon: Pistol
ProximityCaptor:
Types:CivilianInfantry C1:
Inherits: ^Infantry
Selectable:
Voice: CivilianMaleVoice
Bounds: 12,17,0,-9
Valued:
Cost: 70
Tooltip:
Name: Civilian
Health:
HP: 20
AttackWander:
JustMove: True
-GainsExperience:
-GivesExperience:
GivesBounty: -50
Mobile:
Speed: 4
RevealsShroud:
Range: 2
AttackFrontal:
PrimaryWeapon: Pistol
ProximityCaptor:
Types:CivilianInfantry
The game should never crash. Report it at https://github.com/OpenRA/OpenRA/issues/salvakiya wrote: ↑That worked but only when the total cash the player had remained above 0. if the player had no money and killed a civ the game would crash.
Edit:
Im no programming expert but is this due to the total cash amount being an unsigned int? and if that is the case is there a way around it?