Posted by: Deinon - Wednesday, December 20, 2017 11:30:51 PM
I'm making modifications to many of the vanilla Generals campaign missions, adding extra elements and making them more challenging. In the GLA mission outside Incirlik Air Base, for example, you capture a Chinese hacker at the spy outpost who helps you bring down the Patriot batteries guarding the base if you manage to capture a power plant in town. Originally, destroying the outpost didn't accomplish much except giving you a vantage point from which to launch Scuds; now you use this guy to cause a massive power surge deactivating the (buffed up) Patriot batteries. If you leave him unguarded, however, he calls the American base for help, prompting them to send a Chinook full of rangers to airdrop into the building he's in. I accomplished this with a simple trigger area and a script identifying if you have no (armed) units inside it.
For the final GLA mission, capturing the Baikonur Cosmodrome, I'm going for something different. The same hacker you captured at Incirlik is again in your charge. To succeed in your mission, in addition to completing the original game objectives, you have to escort him with an armed guard to the Ground Control Center after capturing it. However, the idea is that if you don't keep a Rebel near him at all times, he makes a run for either the American base or the Chinese base depending on which is closer (again, controlled by a trigger area) - if he reaches them, a chinook is sent to retrieve him and the mission is failed. If he dies, the mission is failed.
The one element I'm having trouble with is getting him to recognize when there is a guard nearby. I tried using the "If False" tab in combination with the "Unit has sighted a unit of type GLA_InfantryRebel belonging to player PLAYER," but even when this should be registering as true, the code meant to operate when it is false is executed.
Is the "Unit Sighted" command bugged, or is negation in general inoperative?
Again, original Generals here, not Zero Hour. Thanks in advance. I look forward to sharing the finished products.
Posted by: SkyMix_RMT - Thursday, December 21, 2017 10:21:04 AM
Try making a script execute every second to check if the hacker has sighted the rebel, if true then nothing happens, if false the script disables itself and the hacker makes a run.
Posted by: Deinon - Thursday, December 21, 2017 1:30:16 PM
[quote=SkyMix_RMT;146846]Try making a script execute every second to check if the hacker has sighted the rebel, if true then nothing happens, if false the script disables itself and the hacker makes a run.[/quote]
I can try changing it to every second. I had it running every frame, and it was giving me a false negative.
Posted by: i^love^mixery - Thursday, December 21, 2017 10:51:50 PM
Pardon my question but why don't you upgrade to Zero Hour?
Hardly anyone here will be able to tell you the scripting differences between generals and zero hour. Plus hardly anybody regularly plays the vanilla game, making your map a lot less attractive after you release it.
Btw:
How many trigger areas are you using to detect which base is closer? I hope your answer is 2 :D
And as far as I remember the "sight" script should work fine. If you still can't get it to work I could create a quick test map if you'd like.
Posted by: Deinon - Friday, December 22, 2017 3:12:02 AM
[quote=i^love^mixery;146858]Pardon my question but why don't you upgrade to Zero Hour?
Hardly anyone here will be able to tell you the scripting differences between generals and zero hour. Plus hardly anybody regularly plays the vanilla game, making your map a lot less attractive after you release it.
Btw:
How many trigger areas are you using to detect which base is closer? I hope your answer is 2 :D
And as far as I remember the "sight" script should work fine. If you still can't get it to work I could create a quick test map if you'd like.[/quote]Thanks for the offer - I was able to resolve my issue by following the suggestion to check the script once every second instead of every frame. :)
I already have Zero Hour; I thought it'd be fun to go back and mod the campaign missions packaged with the original game. Smarter AI, extra objectives, playing around with scripting. The Chinese hacker I was working on here shows up in four different campaign missions now, spread across both Generals and Zero Hour - captured outside Incirlik, the GLA forces him to do different things for them until you get a chance to free him in Zero Hour's penultimate USA mission (where you also fight Dr. Thrax personally in a helicopter now). My main project right now is actually two Generals Challenge missions for the "Global Crisis" mod featuring detailed and heavily-scripted cities with civilian/insurgent elements which you fight around and through to reach the enemy base. Hurt civilians, and they turn around and start hurting you. Also a big factor in one of my modded campaign missions.
I only used one trigger area to determine which base he should run for. A giant triangle cleanly covering half of the map. :)
Now I just need to figure out how to make it so he can't be garrisoned in tunnels, buildings, or vehicles... I know Angry Mobs can't, but he's just one man.
Posted by: SkyMix_RMT - Sunday, December 24, 2017 4:37:50 PM
[quote=Deinon;146859]
Now I just need to figure out how to make it so he can't be garrisoned in tunnels, buildings, or vehicles... I know Angry Mobs can't, but he's just one man.[/quote]
Add this in the chinese hackers code through the map.ini:
TransportSlotCount = 0
Posted by: Deinon - Wednesday, December 27, 2017 3:09:43 AM
[quote=SkyMix_RMT;146864][quote=Deinon;146859]
Now I just need to figure out how to make it so he can't be garrisoned in tunnels, buildings, or vehicles... I know Angry Mobs can't, but he's just one man.[/quote]
Add this in the chinese hackers code through the map.ini:
TransportSlotCount = 0[/quote]You are a lifesaver. Thank you. A few more tweaks and it'll be ready for release.
Posted by: AdrianeMapMaker - Thursday, December 28, 2017 5:06:15 AM
I have a great idea .. after youve done the map , convert it to zerohour using zh worldbuilder
it will make the map available at two games