Renegade Projects Network Forums
FinalAlert script trouble - Printable Version

+- Renegade Projects Network Forums (https://forums.renegadeprojects.com)
+-- Forum: Modding (https://forums.renegadeprojects.com/forumdisplay.php?fid=3)
+--- Forum: Red Alert 2 & Yuri's Revenge Editing (https://forums.renegadeprojects.com/forumdisplay.php?fid=8)
+--- Thread: FinalAlert script trouble (/showthread.php?tid=1020)



FinalAlert script trouble - Marshall - 17.07.2008

I'm new at mapping so apologies. Working on an SP map for YR.

I have a trigger that creates an enemy Spy on the map 10 seconds after map start and sends it to the player's Battle Lab.
This is the script:
[01000086]
0=0,4
1=0,4
2=3,35
3=9,0
4=5,1
5=46,10
Name=Allied Spy Battle Lab

The Spy appears and moves straight to waypoint 35 without disguising first. He doesn't deploy, of course. He then spies on the Battle Lab.

So basically, everything works great except he doesn't disguise first. There's plenty of player conscripts around so what am I missing?


RE: FinalAlert script trouble - DCoder - 18.07.2008

The only thing I can see odd is that you're telling it to attack enemy infantry twice instead of once. Not sure if that has any effect, but you know the AI will break as soon as you look at it wrong... Have you compared the teamtype against a stock one involving a spy?

Mind also that there is no guarantee that he will actually target and infiltrate the same player.


RE: FinalAlert script trouble - MRMIdAS - 18.07.2008

There ARE infantry on the map right?

other than that it SHOULD work, although it might be a good idea to have a "wait" command after attacking infantry.


RE: FinalAlert script trouble - Marshall - 19.07.2008

Thanks guys.

The two 'attack infantry' actions were just an attempt to force it to work - I'd already tried with just one and that didn't work.

I've managed to get it kinda working now. By replacing action 0 with 'Guard Area for 2 ticks' he will disguise first. Strange.

Now I'm stuck on how to make infantry garrison a specific building.


RE: FinalAlert script trouble - MRMIdAS - 19.07.2008

Move to waypoint ##
garrison civillian buildings.

put the waypoint next to the building you want 'em to garrison and it should be all good.


RE: FinalAlert script trouble - Marshall - 19.07.2008

There is no 'garrison civilian buildings' action...


RE: FinalAlert script trouble - DCoder - 20.07.2008

Move To Waypoint (1, x) or Garrison Structure (64, 0) should theoretically do the job, if you place the target wp under the top corner cell of the building in question. Mind that using the new YR-only script actions 59-64 will confuse FA2 and it will "helpfully" remove them next time you open the map in it...


RE: FinalAlert script trouble - MRMIdAS - 21.07.2008

Marshall Wrote:There is no 'garrison civilian buildings' action...

blarg.

was tired, you knew what I meant anyway.Tongue


RE: FinalAlert script trouble - Marshall - 21.07.2008

Thanks guys. 'move to waypoint' doesn't seem to work, although the script had other tasks after it so that may have caused a problem. I'm loathed to use action 64 if FA2 will strip it out - I'll add that manually later on if neccessary.

Can you make the camera follow a unit or should I just use a series of 'camera move to waypoint' actions?

Also, is it possible to create a building for one AI player (ally of human player) and then give the building to the human player without changing the colour? Basically I want an ally to construct a power plant for the player that the player gets the benefit of but is clearly marked as "belonging" to the ally.

Should probably be posting separate threads for all these questions but didn't want to clutter up the board.


RE: FinalAlert script trouble - MRMIdAS - 21.07.2008

isn't there a "change owning house" option?

you should be able to tell the AI to build a powerplan at a waypoint, then change the house to the player's house while it's building up.


RE: FinalAlert script trouble - DCoder - 21.07.2008

I don't think that powerplant thing is doable, unless you want to make a cobweb of triggering and clone the PP itself, so that when the AI builds the cloned PP (hopefully a unique building), a map trigger fires (Event 60, Exists On Map) and activates a different player-owned powerplant clone (either outside the visible map area or as an invisible 0x0 building), and then deactivates it back after said PP is lost. I don't know how the game will like the player owning an outside-the-visible-area object though... yeah, as I said, fugly.

Quote:Should probably be posting separate threads for all these questions but didn't want to clutter up the board.
Renaming the thread to something more applicable like "Various AI/Map Scripting Questions" or something would make sense, since these are technically not FA2 questions, but scripting ones.


RE: FinalAlert script trouble - Nighthawk - 22.07.2008

Have a second player-controllable house with the same colour as the AI. When the AI builds the power plant, have it change over to this new house. It will still look like it belongs to the AI in colour, but you'll get all the benefits of it. If you don't want the player to be able to sell it, just use the INI Editor in FA2 to give it Unsellable=true.


RE: FinalAlert script trouble - MRMIdAS - 22.07.2008

DCoder Wrote:I don't know how the game will like the player owning an outside-the-visible-area object though...

It's fine with it.

although making a "lose" trigger is a bit more difficult, as you've got to make clone buildings and give said buildings an "Insignificant" tag, so they blow up like oil derricks once all your "proper" buildings are gone.