|
Post by keepitsimple on Jan 31, 2016 17:10:12 GMT 1
The problem with the construable bridge in BK is that their are shown on map. There no surprise were you or AI can cross. Here is script that makes an invisible crossing to the player that AI or player can use. Precondition. You need to work with a mod that has an invisible bridge. In the map-editor: You lay your invisible bridge (number it) and lay on top terrain object REMOVAL 1 or 2. Number the REMOVAL also (note: not same number as the bridge) and make them a reinforcement (hence in game they are not shown till the reinforcement is called). In the script: At the very start you need to run the following. RunScript( "DestroyInvisibleBridge", 10); -- the invisible bridge is destroyed. This is need so neither the player or AI units can use the invisible bridge to cross the river. function DestroyInvisibleBridge() DamageObject(350, 250); Suicide(); end; Next somewhere in the game you want the AI to cross the river at a secret location. Now you run the following function. -- The AI needs to cross the river. An truck with IdScript 113 is send to area "IB" -- The invisible bridge is repaired (by script) -- LandReinforcement(40) lands : terrain objects REMOVAL1 or REMOVE2 are made visible -- The crossing is now visible and the river is cross-able and AI is moving it infantry across. function InvisibleBridge() local truck= GetNScriptUnitsInArea(113, "IB"); if truck>=1 then DamageObject(350, -1); -- repair invisible bridge -- LandReinforcement(40); Cmd(3,119,GetScriptAreaParams("Attack")); Suicide(); end; end; The last thing you need to do to make truly invisible is is to included an image of the map without the invisible bridge into the pak file.
|
|
Mat
General
Posts: 1,814
|
Post by Mat on Feb 2, 2016 0:08:26 GMT 1
Gold worth! Thanks Keep!!
|
|