Posted: Sun Mar 10, 2013 4:04 pm Post subject:
Train modding question
I've been lately doing random stuff with Tiberian Sun, and lately stumbled on a very annoying problem: I've set up a train track with gates between it on the tracks. The gates work as expected, lowering when the train approaches The problem though is that it the Istrain=yes rule makes the train C4 the gates. It does not happen all the time, there are fixed situations where the gates do not get blow up, but those are only a few. I tried to make the gates immune, adding lines like bridgerepairhut=yes and immune=yes, but nothing helps.
Is there a way to make buildings immune to the istrain=yes C4 effect? Or perhaps removing the C4 effect from the istrain=yes? QUICK_EDIT
Joined: 10 Dec 2012 Location: I'm too busy conquering the world!
Posted: Sun Mar 10, 2013 4:11 pm Post subject:
Create a Celltag undeneath the Gate so that when the train across the gate it blows up the gate. Or set timer before the gate so that when the gate goes down, it will blow up. These can be done by triggers. _________________ Mod Leader and founder of World Domination
Create a Celltag undeneath the Gate so that when the train across the gate it blows up the gate. Or set timer before the gate so that when the gate goes down, it will blow up. These can be done by triggers.
Ehmm, I want the contrary: NOT to blow up the gate? The train automatically destroys the gate when it travels over it. QUICK_EDIT
He wants to stop the train from blowing up the gate not make it blow it up :/
Have you tried making the train stop in front of the game for a few seconds, I might be that the train goes threw the gate before it fully opens & thus destroys it. _________________
He wants to stop the train from blowing up the gate not make it blow it up :/
Have you tried making the train stop in front of the game for a few seconds, I might be that the train goes threw the gate before it fully opens & thus destroys it.
Yes I did, didn't help. Though it gives me an idea: is it possible to speed up the framerate of the opening/closing animation of the gates? QUICK_EDIT
IsTrain is like a SuperOmniCrusher in Ra2. It crushes everything and AFAIK you can't prevent that, unfortunately.
Though if you still found a solution, please let us know _________________ SHP Artist of Twisted Insurrection: Nod buildings
First of all, I scripted the train to around. The IsTrain=yes line infact necessary for the to script to work. If it is not added, the train will at best move to the first waypoint, if that waypoint is at one straight line.
Secondly, discovered by accident, if the gate lowered before the train arrives, it will not blow up. Are there triggers of some sort to directly lower a gate? If not, I need to script a unit to go through the gate each time.
Lastly, from certain directions the gates will not blow up even if the gates aren't lowered beforehand, AT A CERTAIN MAXIMUM SPEED. If the train goes too fast it will blow up. I set its speed at 5; trains moving through gates from either BL to TR, or TL to BR will not blow the gate up.
Mind you that even though speed can still be decreased, going lower would mean it misses the point of having a transport train on the map. QUICK_EDIT
Secondly, discovered by accident, if the gate lowered before the train arrives, it will not blow up. Are there triggers of some sort to directly lower a gate? If not, I need to script a unit to go through the gate each time.
Nope, you could however spawn a dummy unit as soon as the train gets near it (cell-tags), that dummy unit would then move across the gate and back as soon as the train has moved over it.
Train near gate -> Dummy spawns at the side of the gate where the train is.
Dummy wants to go behind the gate -> gate lowers, when unit is at waypoint behind the gate, set local.
Local set -> Train 'clear' to move, clear local when it passes the gate.
Local clear -> Dummy unit back to its original spawn point (depending on the direction of the train eg. circular) _________________
I have given up on the idea. The game really does not coöperate on this one. Apart from blowing up gates, the train with following cargo units ends up like a harmonica each time it is waiting at a gate, with the individual units of the train ending up being so close that they "C4" eachother. QUICK_EDIT
Nope, sorry. I already made the changes. I'm quite happy with the result now. Although no gates, the track is awesome now. It was particulary difficult to get the track implemented. I am actually using GDI mission 09 Core of the Problem for it. QUICK_EDIT
Like a tunnel beneath the gate? Like I said, I am working on an already existing map. I implemented 2 pairs of tunnels entrances, which were extremely hard to place due space restrictions. More tunnels as practically impossible. If it were possible though, it would of course solve the problem. QUICK_EDIT
Basicilly it gives a very nice alternative for gates: Setting up laser fences and make a laser post go offline when units want to pass through. I tried it ingame by placing a laser fence, between laserposts, on the track and setting the laserpost offline. Works like a charm. It only needs some triggers and a bit of adapting the train script to get it done automatically, but that should be only minor work.
I know it is just a game, but now I feel like this:
Gates look nicer. Give my method a shot and you'll agree.
Gates are indeed nicer, but in some cases the gates still blow, even though being fully lowered.
I also have a problem; an attached trigger will not fire. I set it up like this:
Trigger 1: "Laser gate1 on" repeating
-Event0: 13. Elapsed Time --> 10
-Action0: 62 turn on building
-Action1: 54 Disable trigger "laser gate1 on"
Trigger 2: "Laser gate1 off" repeating; Trigger 1 is attached to this trigger
-Event1: 1 Entered by... 3 Special (House of train); celltags in front of laser gate
-Action0: 61 turn off building
-Action1: 53 Enable trigger "Laser gate1 on"
I attached trigger 2 to the laser fence post. Trigger 2 fires, turning the fence post off, but trigger 1 does not fire, so the fence post does not reactivate after 10 frames. What did I do wrong?
EDIT: NVM, it appears to work suddenly... . QUICK_EDIT
You did remove the tag of the trigger not attached to the fences, right? If you want to attach trigger 1 to trigger 2, you have to remove the tag of trigger 1 (as it uses the one from the 2nd trigger).
Also, for a repeating trigger to be called again, you'd have to disable it when it has fired all actions. Trigger 2 needs to disable itself after it is finished.
Trigger 2; default not-disabled? Event met, entered by House 3 -> Turn building off, enable Laser gate1 on + Disable Trigger 2.
Trigger 1; Enabled by Trigger 2, event met; 10 seconds passed -> Turn building on, enable Laser gate1 off + Disable Trigger 1.
That is how you make them loopable. It also prevents the game from re-enabling Trigger 1 when a train car (wagon) has moved over the celltag. As soon as a train hits the celltag, it disables itself to prevent restarting of the elapsed time and enables the 'closing' of the gate. When the gate is closed, it will re-enable the opening trigger making this whole story repeat itself. _________________
You did remove the tag of the trigger not attached to the fences, right? If you want to attach trigger 1 to trigger 2, you have to remove the tag of trigger 1 (as it uses the one from the 2nd trigger).
Also, for a repeating trigger to be called again, you'd have to disable it when it has fired all actions. Trigger 2 needs to disable itself after it is finished.
Trigger 2; default not-disabled? Event met, entered by House 3 -> Turn building off, enable Laser gate1 on + Disable Trigger 2.
Trigger 1; Enabled by Trigger 2, event met; 10 seconds passed -> Turn building on, enable Laser gate1 off + Disable Trigger 1.
That is how you make them loopable. It also prevents the game from re-enabling Trigger 1 when a train car (wagon) has moved over the celltag. As soon as a train hits the celltag, it disables itself to prevent restarting of the elapsed time and enables the 'closing' of the gate. When the gate is closed, it will re-enable the opening trigger making this whole story repeat itself.
Yeah made a mess on that one. Luckily I got it working now, and the clone trigger feature made life a whole lot easier.
Mind you that I still had to be careful; the train coming at full speed to the unpowered laser fence will still blow it up. The train first has to stop right at the fence before proceeding. This way the train will not blow the fence. I also tried this with normal gates, but unfortunaly that did not worked.
So yeah, I got some sort of a gate system now. I found it unlogical to have heavily guarded bases which have gates for standard unit, but have a big hole in the wall for a train to come through. QUICK_EDIT
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