| Posted by: vovanius - Monday, March 3, 2008 1:32:21 AM |
|---|
| Hi All! I am not so good in English, so maybe I missed a similar topic when searched... don't be angry, please! For the reference - I using Generals ZeroHour WorldBuilder v.0.8, included in game distributive. Is it OK? Maybe there is a newer version and the problem below is my version's issue? So, here's the problem. I want to have some independent team in skirmish game, that would attack me and my computer controlled enemies. Let's call them 'Partizanen', eah... So, first of all I create a team under PlyrCivilian, name it, and set Identity tab as follows: Max. quantity 1, Owner PlyrCivilian, Home position 'some waypoint', Condition 'Sub_start' (already written in scripts, and script 'Start' calling this sub written too, both are executed at the beginning, checked). Priority, Build for, Increase..., Decrease... all 0 (defaults), Min 3, Max 3, Unit type 'Militia Tank', Automatically reiforce... unchecked, Team members are... and Team created once... are both checked. Other tabs by default. So, when I start game, script 'Start' executes (checked by embedded sound effect), calls subscript 'Sub_start' (checked the same way), but team is NOT appear at any place of map. Again, trigger script is definitely executed at the very beginning of game. Team is not created. So, what I'm doing wrong? Thank You. |
| Posted by: Me Myself and Pi - Monday, March 3, 2008 9:27:27 AM |
|---|
|
There is only one version of the Zero Hour world builder & it comes with the game.
Civilian teams don't work in skirmish/multiplayer play. (They only work for skirmish players, & that's how it works in AOD maps.) You'll have to use an entire player instead. But note, this won't work for other human players in a multiplayer game. It only works with the host & the skirmish players.
1) Create a new player in the map list with a civilian faction. (Note, it won't work just have it consider the other skirmish player here. That only works in a single player map.)
2) Go to script window & create a script in the [b]PlyrCivilian[/b] folder using the action, [b]Player\Alliances\Change how a player relates to another player.[/b]
3) In this action, have the player you created consider [b] |
| Posted by: vovanius - Sunday, March 9, 2008 5:09:46 AM |
|---|
|
Well, thanx for excellent explanation, all works good! Now I have some scripts related question. I'd like to know, what objects or players are tags |
| Posted by: Me Myself and Pi - Sunday, March 9, 2008 10:53:38 AM |
|---|
|
Yes, |
| Posted by: vovanius - Monday, March 10, 2008 3:35:09 AM |
|---|
| OK, got it. Now here is another question (sorry if boring You, im just new for all these things). There is Jarmen Kell patroling the map, he's a single unit belonging to above 'Partizanen' player. I programmed him to guard current position if he sees an enemy, and continue moving his way if all clear. Also he sometimes garrisones nearby buildings, stays there for a while, then moves further. If he's destroed, he reborns in some time in far deep forest and starts again... He hunts infanty units great, but how to make him snipe vehicles??? I programmed him to use commandbutton ability 'SnipeVehicleAttack' on an object (a NAMED test vehicle, controlled by me), he did it, but what about ANY enemy vehicle? I did not find any 'use ability on nearby enemy object' or something for single unit. And just 'use ability' without target does not work. What can I do about it? Oh, and some design related question. I am just remaking a map, not creating from very begining. I noticed that my and my enemy units passing the bridges like it should be, moving on their suface. And civilian units that automatically moving some looped waypoint (cars, buses etc) are like "diving" under the bridge surface when passing. Actually, they moving on the river bottom, ignoring bridges. Fow can I fix this? [EDIT: Double Post Splice -- CommieDog] |
| Posted by: Me Myself and Pi - Monday, March 10, 2008 1:06:13 PM |
|---|
| 1) Use the action, [b]Team\Hunt\Set to hunt using commandbutton ability.[/b] So select TeamPartizanen & the sniping command button. 2) You're probably using the action, [b]Unit\Move\Set a unit to EXACTLY follow a waypoint paths.[/b] This allow unit to go through every kind of obsticle, such as, mountains, cliffs, water, structures, & bridges. Use the [b]Unit\Move\Set a unit to follow a waypoint paths.[/b] action instead. |
| Posted by: vovanius - Wednesday, March 12, 2008 3:37:56 PM |
|---|
| Well, it works. But when I set entire team to hunt, all units begin to hunt, not only J.Kell. What if I need other partisan units to stay still or move somewhere else while Kell is operating? Script 'hunt using commandbutton ability' sets to hunt all team units or only those, who are able to use selected ability? |
| Posted by: Me Myself and Pi - Thursday, March 13, 2008 6:47:00 AM |
|---|
| Oh. Well then, just create a bunch more actions, [b]after the action to tell Jarmen Kell to hunt[/b], Telling all the other units to stop. |
| Posted by: vovanius - Thursday, March 13, 2008 3:30:25 PM |
|---|
| Well, I thought so, but also I thought there is more "elegant" way to do this. Why did'nt they make a similar set of scripts for teams & for units? I noticed a lot of team scripts, that could be theoretically applied to single unit... And that script tree - can it be manually sorted? It takes a time to find something, especially when needed script hidden somewhere in 'unused'. I found file "C&C Generals - Zero Hour\Zero Hour\Data\Scripts\Scripts.ini", where, as I think, there is description of all scripts, can it be modifyed? Maybe someone already did it? I mean, sorted scripts more logically? In Scripts.ini I found this: ScriptAction InternalName = "NAMED_HUNT"; UIName = "Unit/Hunt/Set a specific unit to hunt."; HelpText="No Help." End and this: ScriptAction InternalName = "TEAM_HUNT_WITH_COMMAND_BUTTON"; UIName = "Team/Hunt/Set to hunt using commandbutton ability."; HelpText="No Help." End What if I insert there a new script descriptor like this: ScriptAction InternalName = "NAMED_HUNT_WITH_COMMAND_BUTTON"; UIName = "Unit/Hunt/Set a specific unit to hunt using commandbutton ability."; HelpText="No Help." End Will this work, how do You think? |
| Posted by: CommieDog - Thursday, March 13, 2008 7:47:04 PM |
|---|
| I don' think you can create new scripting actions like that. If you really want Jarmen Kell to operate independently of other units, you'll have to put him in his own team. |
| Posted by: Me Myself and Pi - Friday, March 14, 2008 4:44:45 AM |
|---|
| Yeah accually, you can sneak in one more player in the player list. Delete one of the skirmish players, (this will delete the scripts in that folder if you have any) add a new player & add the skirmish player back it. I don't think it'll let you create a 2nd player if you have all the skirmish players in the game. If you've imported the skirmish scripts into your map, I recommend you export all of you scripts & import them into another map. Then remove all buy one of the players from the player list from that map (including PlyrCivilian) but sure that the player you keep is the one you're going to temporary remove from your other map. So now you have only the scripts for you map in one skirmish player folder, go ahead & export those. Go back to you map now & remove that skirmish player, create the new play & add skirmish players again. Then import those scripts for that one player back in. For units, they only have a hunt script, not a hunt with a command button action. It does look like you can change the path of a script from that INI file. But I dought you'll be successful in creating a new one. But be sure to save a copy of that file to your desktop before you do. Modifying might now allow you to play online. |
| Posted by: vovanius - Wednesday, March 19, 2008 2:16:32 PM |
|---|
| Well, above question is more or less solved. Now I have a few others: How can i determine in script if the named vehicle became unmanned (was sniped)? How can I determine if named unmanned vehicle was captured by certain player? Is it possible to initiate nuke explosion somewhere without missile, when say any unit enters some trigger area? Thank You all for cooperation :) |
| Posted by: Me Myself and Pi - Thursday, March 20, 2008 6:22:44 AM |
|---|
| You might be able to use some conditions in the Player\Owns folders. To have script act upon getting sniped, you might be able to use the condition [b]Player has (comparison) unit type.[/b]. I think that when a vehicle gets sniped it goes from the PlyrCivilian player to the Neutral player. That is, if you had the vehicle start out in PlyrCivilian. So in that action, specify that when PlyrCivilian owns equal to 0 of unit type. For when it gets captured, just put a trigger area around the sniped unit & when the unit leaves the area from getting captured, you could have the script act on that. ([b]Unit\Area\Unit exits an area.[/b]) To get nuclear explosion to occur, use the action, [b]Unit\Spawn\Spawn -- an unnamed unit on team at waypoint.[/b]In that action specify that [b]Civilian\System\NeutronMissile[/b] (The Neutron Missile is the Nuclear missile) spawns on team [b]TeamPlyrCivilian[/b] & whatever waypoint you want. |
| Posted by: vovanius - Monday, March 24, 2008 1:36:04 PM |
|---|
| It all works accept nuclear explosion. Missile appears where explosion should be, but there's no explosion itself. Missile just lays on the ground... I tryed also 'Neutron Blast Object' and 'Scud Storm Missile' - nothing happens. The things worked were 'Nuclear Bomb' and 'MOAB', but I need more destructive blast. |
| Posted by: Me Myself and Pi - Monday, March 24, 2008 3:59:11 PM |
|---|
| Oh, okay. Then use the action, [b]Spawn -- a named unit on team at waypoint.[/b] & name the missile. Then right after that, use an action to kill the missile. If it still doesn't work, then just spawn the Civilian Vehicle, [b]ConvoyTruckArmedWithNuke[/b] instead. That at least will work. |
| Posted by: vovanius - Sunday, March 30, 2008 2:12:22 PM |
|---|
| Yep, all working good now. Partisan units operating very effectively, causing a lot of trouble to those who entering town. Just some more details to finish... Is there a possibility to spawn something (e.g. GLADemoTrap) on CURRENT unit position? I mean, if unit sees an enemy, he 'places the mine' right where he is, then trying to run away. If enemy will chase him, he'll be surpised :) |
| Posted by: Me Myself and Pi - Sunday, March 30, 2008 3:31:07 PM |
|---|
| No, there's not action that will do that. What you could do though is use Colonel Burton to to set a bomb on a unit or building. |