View Full Version : HELP! I cant get units to attack
cdurham82
07-17-2007, 01:10 PM
Anyone who can help me,
I am having fun with a map, and i made some scripts, I have the unit moving around (following my waypoint path), now I would like to be able to get the unit to attack anything that gets close enough to it while it moves around this path, PLS help me, this is so annoying =) I am including the map to download, however, out of frustration, i deleted the unit and or path, if someone could add a simple unit somewere on map and script it to attack anything that gets in its range as an example for me, i would be VERY greatful.
- Chris
Me Myself & Pi
07-17-2007, 02:56 PM
There is a way, but for skirmish & multiplayer maps, it'll only work with the host. The units will only attack the host, none of the other players, or the skirmish players. Do you still want to know how to do it?
Oh, I your map is much to big, if multiplayers play it, they'll rely on air craft more then the ground. Also, if players don't have the map in advance, then the'll they won't see that captions you display, istead they'll see this:
MISSING: 'MapIntro:01'
MISSING: 'MapIntro:02'
MISSING: 'MapIntro:03'
If you take the .str file out of your map folder, you'll see the same thing when you play the map. If you noticed, it always say s"MISSING" & after that, you'll see the caption name. This is a bug in Zero Hour that EA Game never fixed. For some reason, this problem doesn't accour in just Generals (Nor Zero Hour.) But after a player gets the map from you, restarts, Zero Hour, then plays the map again, & every time after that, they'll see the captions currecly. This is what I do to get around this problem: I have all the caption names, the caption itself. I reccamend that you do the same, so change your STR file from:
MapIntro:01
"Created by GloriousTanks"
End
MapIntro:02
"Holy Ground"
End
MapIntro:03
"For more maps and mods, please visit www.RiverClam.com"
End
To:
Created by GloriousTanks
"Created by GloriousTanks"
End
Holy Ground
"Holy Ground"
End
For more maps and mods, please visit www.RiverClam.com
"For more maps and mods, please visit www.RiverClam.com"
End
Now go to the scripts in your map & in the actions that you see "MapIntro:01", "MapIntro:02", & "MapIntro:03". Change them to "Created by GloriousTanks", "Holy Ground", & "For more maps and mods, please visit www.RiverClam.com" respectively. Now the player will now see:
MISSING: 'Created by GloriousTanks'
MISSING: 'Holy Ground'
MISSING: 'For more maps and mods, please visit www.RiverClam.com'
But you'll still see the same thing that you also ways see.
chaoscontrol512
07-17-2007, 03:13 PM
What I do is I make a script that tells the unit/team to hunt and follow a WP path simultaneously. Hunt must be above follow WP path, or they will just hunt and not follow the path. OR if you want them to attack the other players, you could set them to just hunt, that might work.
cdurham82
07-17-2007, 04:26 PM
Wow, thank you, I changed the strings like you suggested, i imagine optimal use, it seems to make sense. I wish I knew how i could change the map size without making all the aspect ratio's go nuts and screw up the map lol
Me Myself & Pi
07-17-2007, 07:39 PM
When you tell a unit, team, or player to hunt, they begin to attack their enemies. They won't hunt down anything that gets close to them.
You haven't gotten very far on your map. So go ahead & resize it, all you have to do is ajust the trigger areas. I'd reccamend you selete the object "TempBuildingSize" & place it in your base areas. You can place this object as easely as any other objects. Just scoll down the list of structures until you see that's as big as you base areas need.
chaoscontrol512
07-17-2007, 09:03 PM
Hmmm, when I told them to hunt and follow the WP path simultaneously, they moved down the path and stopped and attacked any enemy they came across. I found this trick in one of the single-player missions, which use much more complex scripts when it comes to attacking their enemies, haven't quite figured out how they work exactly, they are so confusing. Anyway, if you use this, make sure that the command for hunt goes above the command for follow WP path.
Edit: One more thing about the str file: You can use \n to have a text string move to the next line. It also removes boldface. Example:
StringTitle
"Created by Glorious Tanks\nHoly Ground\nFor more maps and mods, please visit www.RiverClam.com"
End
The result looks like this:
Created by Glorious Tanks
Holy Ground
For more maps and mods, please visit www.RiverClam.com
Of course, for this to work, everybody who's playing needs a copy of the str file.
Me Myself & Pi
07-17-2007, 11:22 PM
Units will go along a waypoint path while hunting if you make the script right. But they'll only attack their enemies. In a skirmish or multiplayer map, you'll have to put the units in the PlyrCivilian player. The PlyrCivilian player is considered nuetral to the host & the host player considers the PlyrCivilian to be nuetral. So they won't attack when they come across the players of the game.
chaoscontrol512
07-18-2007, 12:33 AM
Couldn't you just make a new AI player in addition to the skirmish players? THe skirmish players considers this guy an enemy, and this guy considers everybody else an enemy.
Me Myself & Pi
07-18-2007, 08:15 AM
Yes, you create a new player with a civilian faction. If you make it any other faction, lets say Laser General, then the skirmish laser general wont work for some reason. I've tried to make this player consider all the other skirmish player enemies, but that doesn't work. I've tried using the action in a script to make them enemies, that didn't work either. But it does work with the host. That's how you can make units attack the host of the game.
vBulletin® v3.8.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.