Deinon
  • Deinon
  • 50.25% (Neutral)
  • Captain Topic Starter
8 years ago
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.
Sponsor
SkyMix_RMT
8 years ago
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.
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
Deinon
  • Deinon
  • 50.25% (Neutral)
  • Captain Topic Starter
8 years ago

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.

Originally Posted by: SkyMix_RMT 


I can try changing it to every second. I had it running every frame, and it was giving me a false negative.
i^love^mixery
8 years ago
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.
Deinon
  • Deinon
  • 50.25% (Neutral)
  • Captain Topic Starter
8 years ago

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.

Originally Posted by: i^love^mixery 

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.
SkyMix_RMT
8 years ago


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.

Originally Posted by: Deinon 



Add this in the chinese hackers code through the map.ini:

TransportSlotCount = 0
Check out:
My Music  (Techno/House/Experimental)
My Website  (GeneralsCentral)
My Youtube Channel  (Inactive)
World Builder Community Discord 
Deinon
  • Deinon
  • 50.25% (Neutral)
  • Captain Topic Starter
8 years ago


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.

Originally Posted by: SkyMix_RMT 



Add this in the chinese hackers code through the map.ini:

TransportSlotCount = 0

Originally Posted by: Deinon 

You are a lifesaver. Thank you. A few more tweaks and it'll be ready for release.

AdrianeMapMaker
8 years ago
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
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage