Jump to content

Some very interesting trigger research


Nyerguds

Recommended Posts

Over at TiberiumWeb, Lin Kuei Ominae has been doing some very interesting experiments with triggers, and has come up with some neat ways to do stuff like making an AI-owned MCV move to a spot and deploy there, making reinforcements arrive on the Nod airstrip, and making a trigger to give a player money. I suggest you check it out ;)

http://www.tiberiumweb.org/forums/index.php?showtopic=3743

Mind my replies though; Lin Kuei did make a couple of mistakes :P

Link to comment
Share on other sites

  • 1 year later...

This may be interesting for mission makers: I'm debugging the trigger reading. So far I've discovered:

 

-Trigger names can indeed only be 4 characters long.

-The C&C ini read does NOT care about ";" comment signs at the start of a line. In fact, I noticed that adding comment lines starting with ; between my triggers screws up the trigger names, because the game reads from the start of the line to the next equal sign, even if that's on the next line. Then it takes the first 4 bytes of that (meaning, of the comment part on the previous line) as trigger name. I tried starting comments with ";=" but this crashed the trigger scanning code as it tried to interpret my comment as trigger.

-Teamtypes seem to have a maximum length of 12 characters, judging from the storage space reserved for the name in a teamtype object in memory. Didn't actually debug the teamtype reading, but there were 13 bytes there, and strings normally always end on a 0x00 byte.

Link to comment
Share on other sites

  • 2 years later...

Huh, looks like tiberiumweb is dead... wonder if it'll come back -_-

 

 

I should really write all of that stuff down some time. I think I still remember all of it.

-Making MCVs deploy

-Limiting the patrol path of gunboats

-C17 reinforcing tricks and giving money

 

...not sure if there was much besides that.

Link to comment
Share on other sites

Well, basically:

Making MCVs deploy:

  • Put an MCV on the map and give it the "Deploy" command
  • Make a trigger to put it in a team to move it around to the place where you want it.
  • Make this trigger fire immediately at the start of the mission, so it overrides the command of the MCV before it actually deploys.
  • After moving to the destination of the teamtype, It will deploy on the end of the route. I'm not sure if you have to give it a new Deploy command there or not, though; it's been a while. There may be some example maps on the forum here, of people who experimented with it.

This can be used for missions where you have to disrupt an enemy convoy with an MCV before it reaches its destination and starts building a base.

Restricting the route of gunboats:

  • I think this was simply making them move between two points. You have to make sure the waypoints are both exactly on its Y coordinate on the map.

C17 reinforcing and money giving:

  • You can make reinforcements arrive with C17s, but only one unit at the time
  • If you specify more units, the first will be delivered, and you will get the cash of the others as if the units were built but then cancelled
  • If you make units reinforce with C17s, but the player does not have an Airfield, the player will receive the money of the cost of the units instead.
Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...