Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 10:09 pm
All times are UTC + 0
[TUT] How to make AI repair bridges
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
RP
Commander


Joined: 12 Jul 2012
Location: Mapping God Heaven

PostPosted: Thu Jul 12, 2012 7:33 pm    Post subject:  [TUT] How to make AI repair bridges
Subject description: Image heavy
Reply with quote  Mark this post and the followings unread

In this tutorial I’ll be showing you how to make the AI (during missions) repair bridges that have been destroyed.
First of all, you need a bridge with 2 Bridge Repair Huts:

You also need to place additional waypoints as indicated on the screenshot.
Once you’ve done that, create a taskforce, script and team for an engineer which will fix the bridge. I used EngieFix1, but you can name it anyway you like.
Script: Add a script and add an action. Select Attack Waypoint… and then the waypoint you want to attack, which in this case is the waypoint on the Repair Hut, 1. (Note: In most cases the Engineer will enter the Hut, you could add an additional Action in the script to make it attack some other thing, like the player’s base)
Taskforce: Add a taskforce with 1 Engineer. Make sure you select the right Engineer for the right side.
Allieds have ENGINEER
Soviets have SENGINEER
And Yuri has YENGINEER



Team: Add a team and set the max to 1, this way the AI can only create 1 taskforce to fix the bridge at the same time. Leaving this at 5 would make the AI spam those specific taskforces. Also set Waypoint to the waypoint you want to have them spawned, in this case that’s 0. Add the Script and Task force to the team. You are done with the Team for now.




Triggers: You only need 3 different triggers for this.
1.First off add a trigger, for the sake of overview I called it Bridge Destroyed,  set the Type to 2 to make it repeat itself.



Events:Then move over to the Events tab, add an Event and select 31. As you can see there is no place you can define which bridge has to be destroyed. Therefore you have to select Place on map and add a Celltag with this Event (happens automatically) underneath the bridge. Only then the game knows which bridge you’re talking about.



Actions: Click on the tab Actions, add a new Action and select 56. What you need to do now is go to Edit -> Local variables (Locals) In the Discription box you should add Bridge Destroyed. Leave Preset value at 0. Once you’ve done that, select that Local from the selection box at the Trigger editor.



2. Add another trigger and name it Bridge Destroyed 2, this trigger should also be repeating.



Events: Go to the Events tab, add an Event and select 36. Select the Local which says Bridge Destroyed.



Actions: Now move over to the Actions tab, add an Action and select 7. Select the Teamtype that says EngieFix1. Add another Action and select 57, Select the Local which says Bridge Destroyed. This Action will clear the local, basically saying “The bridge is fixed” though the actual ‘fix team’ is still on its way, that’s why you need the next trigger.





3. Add the final trigger and name it Bridge Destroyed 3, set the Type of this trigger to 1. Though it is unknown what this type does, it makes the trigger only fire when every Event has been carried out by every team member.



Events: Switch over to the Events tab, add an Event and select 29. This Event will trigger when the Engineer is killed, but not if it captures or repair something (infiltrate).



Actions: For the last time you have to move over to the Actions tab. Add an Action and select 56. Select the Local which says Bridge Destroyed.




Finally, add the last trigger to the Teamtype you’ve created earlier, you can see on the screenshot where to select it.
As you can see, this trigger is to check whether the Engineer actually reached its destination. Whenever the Engineer is killed, the Local that says the bridge is destroyed will be set again. When that happens the AI will just send another Engineer. It basically keeps repeating when the Engineer is unable to repair the bridge.


http://www.youtube.com/watch?v=3MfmAeTi8CQ&feature=youtu.be


Key Words: #Tutorials #Mapping #RedAlert2 #YurisRevenge #FinalAlert2 

Back to top
View user's profile Send private message
OrangeNero
Commander


Joined: 11 Jan 2012

PostPosted: Thu Jul 12, 2012 10:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

This AI program you use, which one is it? Can it be used for TS as well? Finally where to get?

_________________
Free Tibed!
EA for worst company of the decade!

Back to top
View user's profile Send private message
^Rampastein
Rampastring


Joined: 11 Oct 2008
Location: Gensokyo

PostPosted: Thu Jul 12, 2012 10:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

OrangeNero wrote:
This AI program you use, which one is it? Can it be used for TS as well? Finally where to get?

That's just FinalAlert, FinalSun has the exact same functionality.

_________________
CnCNet Client | CnCNet TS patches | More Quality-of-Life Improvements for RA Remastered


Back to top
View user's profile Send private message ModDB Profile ID Facebook Profile URL
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1561s ][ Queries: 11 (0.0081s) ][ Debug on ]