Jump to content

How to make an AI unit move to a waypoint after a set amount of time?


Jeod

Recommended Posts

I have a mission where, after 2 minutes, a Nod unit should move to a certain waypoint. This unit is already on the map when the mission starts. He is to move to the same waypoint where a Chinook will be at the 2 minute mark, so the unit will board the transport. I've looked through the triggers and cannot figure out a way to make an existing unit move to a waypoint.

Link to comment
Share on other sites

Oh, that's not hard. Just make sure that when the team is created, it'll always pick that unit. This usually boils down to making him a unique type on the map, and making the unit Recruitable by not putting him on Area Guard or something.

 

Production is controlled by the teamtype switches. If you don't enable the "Will be produced" switch, it won't be. It's that simple.

 

team=Owner,a,b,c,d,e,f,g,h,i,NrOftypes,type1:amount,type2:amount,NrOfCommands,Command1:value1,Command2:value2,j,k

a=X toggle *

c=ALT toggle *

d=Autocreate

f=Unknown; usually related to tech level

g=Team multiplier. Any value higher than 0 means it gets produced

j=Replace destroyed team members

k=Produce inactive backup of the team

* needs some thorough testing if I got some time; the notes on A and C are useless

 

So yeah, just go with the standard reinforcement template and you should be good. That's

0,0,0,0,0,7,0,0,0 for the switches, and ending on 0,0

 

 

It's impossible to make units enter chinooks with triggers though, so I hope you weren't planning on doing that...

Link to comment
Share on other sites

Yeah, I thought he would enter the chinook if the vehicle was on the cell he was supposed to move to. I need some way to get him off the map. (It's a "kill the spy" mission, and you have two minigunners who must kill him before he leaves the map; the spy is a Nod minigunner, the only one of his type on the map (unless you count the GDI minigunners))

Link to comment
Share on other sites

You could just work with a small nod outpost with a chinook in it, light it up with a flare, and just make the player lose from the moment the spy reaches the cell before the chinook, with a Player enters trigger.

 

In that case it's advised to make the rest of the base either unmanned or not really Nod though to prevent other units accidentally walking on the celltriggers :P

Link to comment
Share on other sites

You might want to make that number a bit higher instead of overriding the funpark campaign :P

 

As far as I can see, your teamtypes are messed up; there are no units in them.

 

Also, that LS1 trigger is a complete mess. "cap" isn't even a correct command; it can only be used as the full "Any,Cap=Win/Des=Lose" trigger linked to a building.

the CVM trigger "Time,None,200,None,CIV,0" seems rather bizarre too...

 

Oh, by the way, triggers can be 4 characters long ;)

Link to comment
Share on other sites

But if I put in a minigunner for Nod, won't that make a NEW minigunner instead of recruiting the one already on the map? The civ teamtype is for the neutral person the spy is meeting with ;)

 

[TeamTypes]

SPY=BadGuy,0,0,0,0,0,7,1,0,0,1,E1:1,1,Move:1,0,0

CIV=Neutral,0,0,0,0,0,7,1,0,0,1,E1:1,1,Move:2,0,0

 

[Triggers]

LS1=Player Enters,Lose,0,GoodGuy,None,0

CVM=Time,Create Team,2000,Neutral,CIV,0

SPM=Time,Create Team,2000,BadGuy,SPY,0

FL1=Time,DZ at 'Z',0,GoodGuy,None,0

LS2=Player Enters,Lose,0,BadGuy,None,0

AWIN=Time,Allow Win,2000,None,None,0

WIN=Destroyed,Win,0,BadGuy,None,0

 

The timer isn't working. They start moving as soon as the mission starts, when they should move only after 2 minutes. Why?

Link to comment
Share on other sites

But if I put in a minigunner for Nod, won't that make a NEW minigunner instead of recruiting the one already on the map? The civ teamtype is for the neutral person the spy is meeting with ;)

Well then genius... tell me how exactly will the game know that it's a MINIGUNNER that has to move to that spot then? You're just saying "no one has to move to waypoint 1". Very useful, that :P

I told you the factors that cause the game to PRODUCE a team rather than just recruit it.

 

By the way, why is your neutral dude also a minigunner, rather than some civilian?

 

[TeamTypes]

SPY=BadGuy,0,0,0,0,0,7,1,0,0,1,E1:1,1,Move:1,0,0

CIV=Neutral,0,0,0,0,0,7,1,0,0,1,E1:1,1,Move:2,0,0

One of these aforementioned factors is the team multiplier. That's the value just behind the "7" there. It was pretty clear from my advice that to prevent the AI from building the team, it has to be 0. Any value higher than 0 means it gets produced. You got it on 1. It's entirely possible that this automatically starts the team, especially since there's no Production trigger in your mission. So put that value to 0.

 

 

I distinctly remember a trigger where if a transport was on the cell the unit moving to that cell would load into the transport. Maybe that was the apc?

 

Any chance to remember the mission, scenario, etc.?

There's no such mission. I'm 100% sure of that. Not in C&C1 anyway. I can see RA1 or TS pull that off, sure, but not C&C1.

 

In fact, if you find missions where a loaded APC attacks your base... it's ALWAYS reinforced.

Link to comment
Share on other sites

I don't know if Attack Civil works... no one ever really experimented with these commands, and as far as I know they're unused in the original campaign.

 

I do know I've had problems with making special teams attack each other though. If there are no real Nod used in the mission, it might be better to use real Nod, and actually disguise them, by making use of the 1.06c colour controls. This will also mean the score screen info will be correct.

 

 

Link to comment
Share on other sites

There is Nod in the mission. Here's the briefing.

 

[bRIEFING]

1=The spy's documents indicate Nod knew we would try to occupy this area.

2=They've bargained with the civilians; Nod offers "protection" in exchange for

3=money. Perhaps their funds are running low. Remove Nod, but don't allow any

4=civilians to die. Nod may disguise their men as GDI so the civilians continue to

5=bargain with them.

Link to comment
Share on other sites

I don't know if Attack Civil works... no one ever really experimented with these commands, and as far as I know they're unused in the original campaign.

 

A little sinchronicity: I've stumbled upon this matter 30 minutes ago:

 

SCG04WB

[TeamTypes]

civ3=Neutral,1,0,0,0,0,7,0,0,0,1,C8:1,11,Move:9,Guard:2,Move:4,Guard:2,Move:5,Move:6,Guard:2,Move:8,Move:7,Move:1,Move:2,0,0

civ2=Neutral,1,0,0,0,0,7,0,0,0,1,C3:1,2,Move:17,Guard:2,0,0

rnf2=GoodGuy,0,0,1,0,0,7,0,0,0,2,E2:5,APC:1,3,Move:13,Move:11,Unload:11,0,0

RNF1=GoodGuy,0,0,1,0,0,7,0,0,0,1,JEEP:2,2,Move:12,Move:10,0,0

ATK3=BadGuy,0,0,1,0,0,7,0,0,0,1,BGGY:2,4,Move:0,Move:1,Move:2,Attack Civil.:50,0,0

ATK2=BadGuy,0,0,1,0,0,7,0,0,0,1,LTNK:2,4,Move:0,Move:1,Move:2,Attack Civil.:50,0,0

CIV1=Neutral,1,0,0,0,0,7,0,0,0,2,C3:1,C8:1,2,Move:3,Guard:1,0,0

atk1=BadGuy,0,0,1,0,0,7,0,0,0,2,E1:4,E3:4,4,Move:0,Move:1,Move:2,Attack Civil.:50,0,0

 

 

I didn't play the mission though (at least, not now)

 

Link to comment
Share on other sites

You don't seem to understand that C&C is NOT an open book to me. I know some parts, but most of the exe is still completely unknown to me. It's like trying to figure out bus routes, in a city without any name tags on the streets, on foot.

 

I can't just change anything at will, and usually not because they'd be such incredibly complex logics, but simply because I have no idea where to FIND the logics to change.

And even then, in some cases they ARE incredibly complex. Especially those related to the AI.

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...